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

Async sockets

I'm trying to connect to a server using non-blocking sockets with the method
Socket.BeginConnect(). Since I don't know the Ip address of my server I
can't get the IPEndPpoint parameter for the BeginConnect() method. Could
someone tell me how to get the IP address of server if you know it's
name(example: mail.htnet.hr)?

--
Frane Roje

Have a nice day

Remove (d*el*ete) from email to reply
Nov 16 '05 #1
3 1861
Hi Frane,

You can get the IP Address of a server from a name by calling the function

Dns.GetHostByName in System.Net name space. You can then build the EndPoint
using this IP address.

HTH,
-Krishna
e-mail : krishkp <at> comcast <dot> net

"Frane Roje" <frane.roje(d*el*ete)@st.htnet.hr> wrote in message
news:cc**********@ls219.htnet.hr...
I'm trying to connect to a server using non-blocking sockets with the
method
Socket.BeginConnect(). Since I don't know the Ip address of my server I
can't get the IPEndPpoint parameter for the BeginConnect() method. Could
someone tell me how to get the IP address of server if you know it's
name(example: mail.htnet.hr)?

--
Frane Roje

Have a nice day

Remove (d*el*ete) from email to reply

Nov 16 '05 #2
Tnak you very much

--
Frane Roje

Have a nice day

Remove (d*el*ete) from email to reply
"Krishna Kumar .P" <kr*****@comcast.net.nospam> wrote in message
news:ud*************@TK2MSFTNGP10.phx.gbl...
Hi Frane,

You can get the IP Address of a server from a name by calling the function

Dns.GetHostByName in System.Net name space. You can then build the EndPoint using this IP address.

HTH,
-Krishna
e-mail : krishkp <at> comcast <dot> net

"Frane Roje" <frane.roje(d*el*ete)@st.htnet.hr> wrote in message
news:cc**********@ls219.htnet.hr...
I'm trying to connect to a server using non-blocking sockets with the
method
Socket.BeginConnect(). Since I don't know the Ip address of my server I
can't get the IPEndPpoint parameter for the BeginConnect() method. Could
someone tell me how to get the IP address of server if you know it's
name(example: mail.htnet.hr)?

--
Frane Roje

Have a nice day

Remove (d*el*ete) from email to reply


Nov 16 '05 #3
Frane Roje wrote:
I'm trying to connect to a server using non-blocking sockets with the
method Socket.BeginConnect().


Just a note. Non-blocking sockets are different from async I/O.
BeginConnect() is async I/O.
--
Joerg Jooss
jo*********@gmx.net

Nov 16 '05 #4

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

Similar topics

1
by: Ben | last post by:
I've written a fair amount of sockets code using the Winsock2 API, but I am having some trouble converting to the .Net Sockets API, specifically asynchronous sockets. What I have is a form that is...
3
by: David | last post by:
Hi, Ive been trying to work this out for the past 2 days now and im not getting anywhere fast. The problem i have is that i am using Asynchronous sockets to create a Socket Client library....
1
by: Trevor | last post by:
Does the async. sockets implementation in .NET use IO Completion Ports (IOCP) internally or would I have to use P/Invoke to use IOCP in a C# async. socket server?
0
by: whizpop | last post by:
Hi, First of all, thanks for a great starter kit, now If I could just get it to work (fully). I am trying to compile and run the solution/services all on a local dev box. I am able to...
8
by: Dinsdale | last post by:
I am trying to write a Tcp "Server" that opens a class that wraps a tcp socket when a new connection is made (Listener.AcceptSocket()). Everything is going swimmingly except when I try to close the...
4
by: Greg Young | last post by:
Ok so I think everyone can agree that creating buffers on the fly in an async socket server is bad ... there is alot of literature available on the problems this will cause with the heap. I am...
4
by: nyhetsgrupper | last post by:
Hi, I've written a async server app. This app start by connecting to a client and then send some data (BeginSend). When the data is sent, the server is starting to listen for incomming data....
4
by: nyhetsgrupper | last post by:
I'm writing a server application connection to multiple clients using sockets. I want one socket for each client, and the comunication needs to be async. I could use the async sockets methods...
11
by: atlaste | last post by:
Hi, In an attempt to create a full-blown webcrawler I've found myself writing a wrapper around the Socket class in an attempt to make it completely async, supporting timeouts and some scheduling...
1
by: Ryan Liu | last post by:
Hi, I have a 100 clients/ one server application, use ugly one thread pre client approach. And both side user sync I/O. I frequently see the error on server side(client side code is same, but...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.