I think this would be very cool--someone asked me about this at last year's
OpenCF Summit and I just never got around to digging into it.

On Wed, Dec 28, 2011 at 9:30 AM, Alan Williamson (aw2.0 cloud experts) <
[email protected]> wrote:

> 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<https://plus.google.com/115990347459711259462>
>    
> http://groups.google.com/**group/openbd?hl=en<http://groups.google.com/group/openbd?hl=en>
>



-- 
Matthew Woodward
[email protected]
http://blog.mattwoodward.com
identi.ca / Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint,
etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

-- 
online documentation: http://openbd.org/manual/
   google+ hints/tips: https://plus.google.com/115990347459711259462
     http://groups.google.com/group/openbd?hl=en

Reply via email to