473,398 Members | 2,343 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,398 software developers and data experts.

Get remote TcpClient address

HI,

How do i get a remote TcpClient address here?

// =======================================
TcpListener l = new TcpListener(IPAddress.Parse("127.0.0.1"), 8080);
TcpListener.Start();

While (true)
{
TcpClient cl = l.AcceptTcpClient();

<Here i need to get the client's ip address>
}
// =======================================

Any suggestions would be highly appreciated!

Thankyou,
Andrey
Nov 16 '05 #1
1 2692
MuZZy wrote:
HI,

How do i get a remote TcpClient address here?

// =======================================
TcpListener l = new TcpListener(IPAddress.Parse("127.0.0.1"), 8080);
TcpListener.Start();

While (true)
{
TcpClient cl = l.AcceptTcpClient();

<Here i need to get the client's ip address>
}
// =======================================

Any suggestions would be highly appreciated!

Thankyou,
Andrey


Well, i replaced TcpClient with a Socket object and now the problem is solved!
Thank you for reading my post anyway!
Nov 16 '05 #2

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

Similar topics

1
by: Stephen Remde | last post by:
what the kosher way of vreating a tcp client/server app in .net? can anyone recommend a good in depth tutorial? currently im using a TcpListener but i cant get a remotre address from the...
5
by: Stu | last post by:
I'm using tcpClient to send data to a pocket pc from the server. The server is dual homed and tcpClient seems to bind to the first address (.AddressList(0)) - how do I bind that to another address...
3
by: Daniel | last post by:
TcpClient close() method socket leak when i use TcpClient to open a connection, send data and close the TcpClient with myTcpClientInstance.Close(); it takes 60 seconds for the actual socket on...
5
by: Horst Walter | last post by:
What is wrong here? IPAddress ipAddress = IPAddress.Parse("10.10.20.1"); IPEndPoint ipEndPoint = new IPEndPoint(ipAddress, this.port); this.tcpClient = new TcpClient(ipEndPoint); // PROBLEM HERE...
1
by: Ethan | last post by:
Hi, In quite a fix here. Hope someone can help ASAP. I need to get the IP address of the client that connects when I use TcpListener.AcceptTcpConnections. I know I can get the information...
0
by: Johann Blake | last post by:
I am using the TcpClient to connect to a web site. I then open a NetworkStream and read the contents that are being sent back. The problem is that I have no idea when the remote host is finished...
1
by: -J | last post by:
When connecting to a server application via a TCP socket connection, how do I retrieve the IP Address of the client computer that is making the connection. I create and IPEndPoint for the client,...
0
by: Mark | last post by:
Ok, Why is this so hard too do? I have a TCPListener that's working exactly as expected. It fires off a new thread to listen on calling this function. ...
10
by: Jan Vinten | last post by:
Hi all, I got into some trouble trying to bind to a specific IP address. Code: Private mobjClient As TcpClient mobjClient = New TcpClient(IPAddress.Parse("10.16.104.87").ToString, 8892)
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.