Solved

TCP/IP question

Posted on 1998-06-30
1
148 Views
Last Modified: 2013-12-03
I'm building a  program that will sit on multiple computers and
function boh as client and server on each one. it's purpuse to send and receive files. The question is:
If the program on Computer A sends a file to computer B using port n, can it accept connection from Computer B
using the same port n?
0
Comment
Question by:MikeP090797
1 Comment
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
ID: 1408995
Yes, the port is only "consumed" on the receiving end and even then, you can have more than one connection on a given port.  As you call the listen() function on the receiver, it will hang until a connection comes in.  Then you call accept() to complete the connection.  If you process the data in a thread, your main loop can go back and keep listening and accepting more incoming connections.  The use of the port is limited to having one listener program on a given port.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now