Skip to content

Commit

Permalink
Update communication.coffee
Browse files Browse the repository at this point in the history
  • Loading branch information
Giermann committed Aug 26, 2015
1 parent 23ac8d5 commit e881145
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/base/communication.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,13 @@ sendCommandToSocket = (options, socket, callback) ->

socket.connect options.port, options.server, ->
debug "Sending",options
data_len = options.data_len || 8192
msg = new Buffer(24+path.length+1)
htonl(msg, 0, 0) #version
htonl(msg, 4, path.length + 1) #payload length
#type of function call http://owfs.org/index.php?page=owserver-message-types
htonl(msg, 8, options.command)
htonl(msg, 12, 0x00000020) #format flags -- 266 for alias upport
htonl(msg, 16, data_len) #size of data element for read or write
htonl(msg, 16, options.data_len) #size of data element for read or write
htonl(msg, 20, 0)
bytesWritten = msg.write(path,24)
msg.write("\x00", 24+bytesWritten)
Expand Down

0 comments on commit e881145

Please sign in to comment.