Anyone know how to encode data into the "Network Byte Order"?

I am trying to use sockets within Revolution 2.5 to connect to my Hotline 
Server using the Hotline Protocol.  The Hotline Protocol documentation states 
that the following needs to be sent to the Hotline Server...

Description       Size   Data   Note
============================================
Protocol ID       4      TRTP   0x54525450
Sub-protocol ID   4             User defined
Version           2      1      Currently 1
Sub-version       2             User defined


And the server is responce will return...

Description       Size   Data   Note
============================================
Protocol ID       4      TRTP   
Error Code        4             0=No Error


So with this information I wrote the following...

on mouseUp
    put fld "serverIP" into sockName
    open socket to sockName
    write "TRTPTEST0100" to socket sockName
    appLog (the result)
    read from socket sockName for 50
    appLog (it)
    close socket sockName
end mouseUp

on appLog theData
    put theData &return after fld "theResult"
end appLog


Unfortunatly after all that, the only thing that is returned is...nothing.  And 
my Hotline Server Log says "Killed Unknown Protocol!"

Anyone have any idea what I'm doing wrong?

 

Derek Bump
Dreamscape Software
____________________________________________
Compress Images Easily with JPEGCompress
http://www.dreamscapesoftware.com
 
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to