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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IO::SOCKET help 2

Status
Not open for further replies.

skosterow

Technical User
Feb 23, 2002
135
US
Greetings from mile high!

Im trying to figure out this IO::SOCKET stuff -

Here is what im looking to do:

Server 1 - Listens on poprt 1117
Server 2 - Send message to Server 1 on port 1117 and awaits a response on port 1117.

if Server 1 does not respond Server 2::DO THIS::
if Server 1 does respond Server 2 ::DO THIS -->

After Server 1 is done send info to Server 2 and start listening again on port 1117 unitll Server 2 sends message again.

Guys/Gals im NOT looking for the actuall code -> I know this sounds stupid - but i have looked for some examples and i have found some but i cant figure out how to change the code, if someone knows of a good tutorial or white paper on this i would be in debt to you.

Thanks for your help!

- Scott




Wise men ask questions, only fools keep quite.
 
Chaz - Good site really explains it but the examples dont work - hehehee

Wise men ask questions, only fools keep quite.
 
in the first example, change line 17 in the client to:
Code:
while ($line = <SOCKET>){

I think the browser is seeing <SOCKET> as an html tag and doesn't display it.
That example worked for me without any other changes.
 
Thanks Chaz -

I figured it out after the post hehehe and thank you for the site as well -

- Scott

Wise men ask questions, only fools keep quite.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top