473,574 Members | 2,777 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

networking help


Code:

IPAddress iadd =IPAddress.Pars e("192.168.1.2" );
IPEndPoint ipe = new IPEndPoint(iadd , port);
Socket sock = new Socket(AddressF amily.InterNetw ork, SocketType.Stre am
,ProtocolType.T cp);
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(S ocketShutdown.B oth);
sock.Close();
how can i find about the ip address of remote client

Dec 1 '05 #1
1 1150
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.co m

"lucifer" <um**********@g mail.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .

Code:

IPAddress iadd =IPAddress.Pars e("192.168.1.2" );
IPEndPoint ipe = new IPEndPoint(iadd , port);
Socket sock = new Socket(AddressF amily.InterNetw ork, SocketType.Stre am
,ProtocolType.T cp);
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(S ocketShutdown.B oth);
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
1669
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 communicate with each other. I don't have much experience with networking, inter-process communication or client-server architectures, and I'm wondering what...
7
8916
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 all the examples in my course notes and Exams refer to C. Can someone please point me in the right direction to where I might find answers on the...
46
2069
by: H.A. Sujith | last post by:
Why doesn't the standard library provide (at least basic) networking facilities using TCP/IP ?
4
1751
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 98/2000/xp
0
11007
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 installed and my application works. But on the Web server I get the error below. I believe it is because the Oracle client was not installed on the web...
2
1599
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 network the laptop to the computer to have access to files (specifically, iTunes). In the SIMPLEST terms, how do I achieve this? Do I need to hook the...
1
1893
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
1126
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 ple help me........
42
2551
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 has a screen and is capable of Ethernet networking. The program requires three things that aren't available in the C Standard: 1) Coloured text (for...
0
7813
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main...
0
7736
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8066
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5305
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3743
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3755
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2251
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 we have to send another system
1
1350
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.