If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

creating multiple ports at server and client

Hi... i am new to the network programming.

i want solution for creating multiple ports at both server and client sides using c/c++.

My main idea is to send requests from different clients to server(ex:to port1) and receive data from server( from another port 2) and at the receiver side again i want new port to receive data from server to each client.

Re: creating multiple ports at server and client

Re: creating multiple ports at server and client

Originally Posted by Richard.J

Why do you think you need such a design. Normally, one socket connection per client would be enough.

Actually i want send jumbo frames [5000bytes] from each client to sever.
My idea is, if we send both request messages from different clients to a particular port on server and send data to same port on the server will decrease the throughput. so i want to send data from clients to different port on the server side.
Is this idea is correct ???

Re: creating multiple ports at server and client

Originally Posted by bhanubtech35

Is this idea is correct ???

I don't think so. You must think in terms of connections, not ports. A connection consists of the tuple (local IP address, local port, remote IP address, remote port, protocol). So if each client establishes 1 connection to the server, everything can be sent via this connection. A separate data connection would not necessarily increase the overall throughput, IMO.

Re: creating multiple ports at server and client

Originally Posted by bhanubtech35

Actually i want send jumbo frames [5000bytes] from each client to sever.

Originally Posted by bhanubtech35

(Here we are using UDP for sending packets.)

For all I know, this seems to be not the best approach. Since UDP packets can not be split, huge packets might be dropped on their way. All applications I know of use UDP for rather small packets (as a rule of thumb I have in mind having read 1500 bytes max.).

However, you are asking for a solution. Are you still in favor of the 2 port solution?

Re: creating multiple ports at server and client

Actually we want to send data through 10Gbps line(i.e. using optical fiber). So, to achieve higher data rates we have to send jumbo packets.Using single port we didn't get good throughput so we want go for 2 ports. Is there any solution for this ? ,otherwise please suggest a procedure to achieve good throughput.

Re: creating multiple ports at server and client

Originally Posted by bhanubtech35

Actually we want to send data through 10Gbps line(i.e. using optical fiber). So, to achieve higher data rates we have to send jumbo packets.Using single port we didn't get good throughput so we want go for 2 ports. Is there any solution for this ? ,otherwise please suggest a procedure to achieve good throughput.

If you are using UDP and Windows, your poor throughput with jumbo packets might be because of a known issue regarding the registry entries respectively called FastSendDatagramThreshold and FastCopyReceiveThreshold. The issue affects only Windows machines (naturally, since it's a registry entry) and not Linux etc. See, for example, these two links:

Re: creating multiple ports at server and client

Re: creating multiple ports at server and client

Cycling is the most fashionable among all sports, not only because of its beautiful curve while riding across the road but also because of the diversified bicycle suits with which riders match their style at their will.You will find many excellent cycling jerseys from this site.