added socket/broadcast feature for the piratepad