BlitzCoder Essentials
•
Home Page
•
About BlitzCoder
•
Contributors
•
Terms of Use
•
Email Us
Main Areas
•
BlitzCoder Chat
•
Discussions
•
Articles/Tutorials
•
Code Database
•
Link Database
•
Showcase Area
•
Worklogs
•
Competitions
Special Areas
•
Undocumented
Other Blitz Sites
•
Blitz Basic Home
•
Blitz Showcase
•
BlitzPlay Library
Forum Login
Username:
Password:
•
Register Now!
BlitzCoder Code Archives Page
Main Codes Page
"OpenTCPStream"
, by thechange
This command has a 3rd parameter to specify the client's local TCP port.
Code
; Connection sequence. ; ; Hosting computer opens the server ServerHandle = CreateTCPServer ( ServerPort% ) ; Client computer attempts to connect to server (note the optional 3rd parameter) StreamHandle = OpenTCPStream ( ServerIP$ , ServerPort% [, ClientPort%] ) ; Server accepts incoming client connection StreamHandle = AcceptTCPStream ( ServerHandle ) ; Both server and client can find out the remote side IP and port RemoteIP = TCPStreamIP ( StreamHandle ) RemotePort = TCPStreamPort ( StreamHandle )
Copyright(c) 2000-2004, BlitzCoder. All Rights Reserved.
Code software created by Krylar's Kreations