473,320 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Is it possible to Bind Two sockets to two endpoints with the same IP/PORT

I have this MultiCast application I'm working on, and for some reason
it won't let me bind more then one socket onto different emdpoints
using the same ip/port.

I'm new to network programming so I don't really understand why this
would be a problem.

Jun 7 '06 #1
1 1796
I'd paste some code, but sounds like you are not spawning a new asychronous
thread on accepting a socket which would explain why once it connects it
doesn't connect any others.

In short you need to on the server do this:

1) start listening on a port
2)OnConnect call back method needs to spawn a thread handling the client
connection socket
3) meanwhile listen continues to accept incoming connections

hope that helps. I assume this is the problem, without code i can't be sure,

"DaTurk" <mm******@hotmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
I have this MultiCast application I'm working on, and for some reason
it won't let me bind more then one socket onto different emdpoints
using the same ip/port.

I'm new to network programming so I don't really understand why this
would be a problem.

Jun 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Johannes Eble | last post by:
Hello Python community, I am trying the echo-client and echo-server examples in Chapter 10, "Programming Python" by Mark Lutz. It is probably the most simple sockets sample: A socket server just...
2
by: sashan | last post by:
I'm writing a program using sockets. I'm binding to a port like this: PORT = 5000 # Arbitrary non-privileged port s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((HOST,...
6
by: Laxmikant Rashinkar | last post by:
Is there any way to use a C# socket in promiscuous mode? Any sample code that shows how this is done? any assistance is much appreciated! thanks LK
2
by: jasonsgeiger | last post by:
From: "Factor" <jasonsgeiger@gmail.com> Newsgroups: microsoft.public.in.csharp Subject: Multiple Clients, One port Date: Wed, 19 Apr 2006 09:36:02 -0700 I'm been working with sockets for a...
14
by: DaTurk | last post by:
I am makeing a Multicast server client setup and was wondering what the difference is between Socket.Connect, and Socket.Bind. It may be a stupid question, but I was just curious. Because I...
14
by: DavidNorep | last post by:
I do not know PHP, consider to write a CGI with this technology and have the following question. Is it possible to invoke a PHP script and let it endlessly wait for requests from a website (a...
5
by: natambu | last post by:
I have a linux box with multiple ip addresses. I want to make my python client connect from one of the ip addresses. Here is my code, no matter what valid information I put in the bind it always...
3
by: Cowboy \(Gregory A. Beamer\) | last post by:
This one is going to be hard to explain. First the question and then the background. If you have a box bound to two subnets through two NICs, can you code your socket listener to listen to a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.