473,473 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

networking help


Code:

IPAddress iadd =IPAddress.Parse("192.168.1.2");
IPEndPoint ipe = new IPEndPoint(iadd, port);
Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream
,ProtocolType.Tcp);
sock.Bind(ipe);
sock.Listen(32);
sock.Accept();
sock.Connect()// problem i dont know remote ip address nor can i hard
code it
web(sock);
sock.Shutdown(SocketShutdown.Both);
sock.Close();
how can i find about the ip address of remote client

Dec 1 '05 #1
1 1142
lucifer,

When you call the Accept method, it returns a Socket instance
representing the connection. On that instance, access the RemoteEndPoint
property to get the EndPoint which represents the ip address of the remote
client.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"lucifer" <um**********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...

Code:

IPAddress iadd =IPAddress.Parse("192.168.1.2");
IPEndPoint ipe = new IPEndPoint(iadd, port);
Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream
,ProtocolType.Tcp);
sock.Bind(ipe);
sock.Listen(32);
sock.Accept();
sock.Connect()// problem i dont know remote ip address nor can i hard
code it
web(sock);
sock.Shutdown(SocketShutdown.Both);
sock.Close();
how can i find about the ip address of remote client

Dec 1 '05 #2

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

Similar topics

1
by: hyperbob | last post by:
Hello, I'm in the design stage of an application that will consist of two or more processes that will be either on different computers in a network or on the same computer and will have to...
7
by: Brian Keogh | last post by:
Hi, I'm a student learning TCP/IP networking at University. Although I understand all about TCP/IP Networking in Java I am expected to understand the basics of C with regard to these programs as...
46
by: H.A. Sujith | last post by:
Why doesn't the standard library provide (at least basic) networking facilities using TCP/IP ?
4
by: Raj | last post by:
I want to program C with networking. Can anyone tell me the How to start with a small simple program can it possible in turbo/borland c 3+. or i should go for another verson. i am using windows...
0
by: petro | last post by:
I am trying to deploy an asp.net application to my web server. My application uses system.data.oledb to connect to an oracle database. On my development machine I have the oracle client 10g...
2
by: JCB19 | last post by:
I need help networking my HP DV4000 laptop to my home network. I have wireless home network with 3 computers using Linksys Wireless G The laptop has built in wireless capability. I want to...
1
by: chinaemerem ibeawuchi | last post by:
What is the difference between URL networking and Socket networking? with an example of each type and state why the choosen networking technique is most appropriate for the example.
4
by: uppili4chi | last post by:
Hello friends , in my company they are going to sift me in Java networking but i don't know any thing about it. can any one give idea of processing in networking. and few of basic concept too ...
42
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
I'm currently writing a program and I've got in mind to keep it as portable as possible. In particular I want it to run on Linux and Windows, but I'm also keeping an open mind to any machine that...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.