Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

server socket for endless stream of bits

Status
Not open for further replies.

simoco

Programmer
Feb 10, 2011
6
GB
I'm trying to create a server socket that will take an bit stream, ie it has no end of line characters (eg CR) so I can't get the 'gets' command to read the input until the connection is broken (which I guess causes a flush of the socket).

I think I will need to read the characters individually then reconstruct the whole message, once I've determined how long the message is from a header that is sent.

I can't get my 'read' (gets) to get individual characters. If anyone knows (or could provide a snippet) on how to set the socket to do this I'd appreciate any advise going. Thanks
 
gets $chanID 1
doesn't work?

_________________
Bob Rashkin
 
sorry. I meant:
read $chanID 1

_________________
Bob Rashkin
 
sometimes I just can't see the wood for the trees - Thats a great help thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top