TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
alexanderdb007
NA
1
0
Multiple Socket Instances On A Single Port?
May 29 2004 9:04 AM
Hi, I'm trying to create a program that acts as a server as well as a client. Upon starting up, a new socket is bound and listens to a port number (In a seperate thread). Also, another thread creates an instance of another socket to connect to any servers. However, the socket is bound to the same port number as the socket thats listening for incoming connections. Upon testing it with a server program, I noticed that the "connection" side didn't work correctly. Although it connected, it didn't send the data as it should. However when I removed the server binding code, the connection worked fine. I really need to be able to do it in this way, with both socket instanes (in different classes) listening for incoming and connecting to servers. However is it possible to do this on the same port number? Or is there something else that might be preventing this from working? I'm using TCP for this. Thanks!
Reply
Answers (
0
)
try/catch delay at first exception
Security Problem