That could be kinda fun ... maybe something like:
You could start listening using:
SocketListen( port=2001, cfc=myCFC );
Stop receiving again:
SocketStop( port=2001 );
You could get a list of all the connected clients:
array = SocketGetClients( port=2001 );
So when a client would connect the "cfc" you defined would be created
and the following interface would facilitate:
onConnect( socket, remoteip )
onRxd( socket, line )
onDisconnect(socket)
You would have some helper methods from the 'socket' object
socket.send( string )
socket.send( bytes )
socket.disconnect()
We could also extend this to use the same method to be a client to other
servers:
socket = SocketConnect( port=1000 );
You could also call the following to read some data:
socket.readLine( timeout=30000 );
Alex Skinner wrote
P.S @Alan how hard would an extension CFSOCKET ?? that you can fire up
listen on a port and send requests through be, Seems like a useful
addition ?
A
--
online documentation: http://openbd.org/manual/
google+ hints/tips: https://plus.google.com/115990347459711259462
http://groups.google.com/group/openbd?hl=en