16,014,591 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by sufi2008123 (Top 9 by date)
sufi2008123
17-Mar-11 5:47am
View
thanks to all
I Want
Once a thread is started,it shouldn't be blocking the UI and also wait to finish the thread.
sufi2008123
1-Mar-11 10:16am
View
thank u very very much for u r reply...
There are more than one IP in Address List and system (e.g computer) use one IP at a time, then can u give me the idea how to detect which is the primary IP (means which IP is Currently using).
sufi2008123
22-Feb-11 10:25am
View
contact me sufi2008@gmail.com
sufi2008123
12-Feb-11 1:22am
View
Thank u sir...
sufi2008123
11-Feb-11 0:56am
View
thank u sir.
You want to know why i need this. Please read the following line carefully specially point No. 3.I want to implement this, that why i need to use the same port.
Suppose that client A wishes to set up a TCP connection with client B and both are behind the NAT. We assume as usual that both A and B already have active TCP connections with a well-known rendezvous server S. The server records each registered client's public and private endpoints.
1. Client A uses its active TCP session with S to ask S for help connecting to B.
2.S replies to A with B's public and private TCP endpoints, and at the same time sends A's public and private endpoints to B.
3.From the same local TCP ports that A and B used to register with S, A and B each asynchronously make outgoing connection attempts to the other's public and private endpoints as reported by S, while simultaneously listening for incoming connections on their respective local TCP ports.
4.A and B wait for outgoing connection attempts to succeed, and/or for incoming connections to appear. If one of the outgoing connection attempts fails due to a network error such as “connection reset” or “host unreachable,” the host simply re-tries that connection attempt after a short delay (e.g., one second), up to an application-defind maximum timeout period.
5.When a TCP connection is made, the hosts authenticate each other to verify that they connected to the intended host. If authentication fails, the clients close that connection and continue waiting for others to succeed. The clients use the first successfully authenticated TCP stream resulting from this process.
sufi2008123
5-Feb-11 6:50am
View
i already try this.
thanks.
sufi2008123
2-Feb-11 7:23am
View
i also face such problem.
part of my code:
//Connect RemoteEndPoint
//this Remote IP is 72.55.168.241
private void ConnectRemoteEndPoint()
{
TcpClient tcp_RemoteEndPoint=new TcpClient();
IPAddress ipAddr = IPAddress.Parse(192.168.1.3);
try
{
tcp_RemoteEndPoint.Connect(ipAddr, 2000);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
//Accept RemoteEndPoint
//This Remote IP 192.168.1.3
private void AcceptRemoteEndPoint()
{
TcpListener listener_tcp;
TcpClient tcp_Remote;
listener_tcp = new TcpListener(IPAddress.Parse(192.168.1.3), 2000);
listener_tcp.Start();
while (true)
{
tcp_Remote= listener_tcp.AcceptTcpClient();
}
)
Error comes from ConnectionRemoteEndPoint() function:
Error: A request to send or receive data was disallowed because the socket is not connected and ( when sending on datagram socket using sendto call)and no address was supplied.
My question link
http://www.codeproject.com/Questions/152601/Problem-to-connect-using-Socket.aspx
sufi2008123
1-Feb-11 5:40am
View
So, you mean to say that every time you use Yahoo messenger, GTalk, Skype etc., you have to configure the Router. Hey Jim the problem is something else.
To clarify he above posted question: Both machines communicate using a socket server over the Internet. Although the machines have unique IP in the LAN, but the main problem is that, both the machines have same IP on the Internet. And Sockets communicate only through IP and PORT, so how will we distinguish which machine is requesting what??? Note, I am taking about the problem, only when communicating over the Internet, and you can find each machines Internet IP using tools like (whatsmyip.com etc). Here the communication issue arises. Any help will be highly appreciated.
sufi2008123
1-Feb-11 5:36am
View
To clarify he above posted question: Both machines communicate using a socket server over the Internet. Although the machines have unique IP in the LAN, but the main problem is that, both the machines have same IP on the Internet.
And Sockets communicate only through IP and PORT, so how will we distinguish which machine is requesting what???
Note, I am taking about the problem, only when communicating over the Internet, and you can find each machines Inter IP using tools like (whatsmyip.com etc). Here the communication issue arises. Any help will be highly appreciated.
Show More