Welcome to Dream.In.Code
Getting C# Help is Easy!

Join 136,106 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,729 people online right now. Registration is fast and FREE... Join Now!




Socket.Bind problem

 
Reply to this topicStart new topic

Socket.Bind problem

cygnusX
14 Nov, 2007 - 10:44 AM
Post #1

D.I.C Head
**

Joined: 19 May, 2007
Posts: 159



Thanked: 2 times
My Contributions
What's wrong with that code?On runtime i'm receiving the following error "The requested address is not valid in its context."AFAIK i receive this error because the ip address is not valid for my computer,but that's my ip address converted to long value.Obviosly there is nothing wrong with the IPAddress constructor then.Can anyone help me with this?

IPAddress ip = new IPAddress(1407475549);
IPEndPoint e = new IPEndPoint(ip,10);
socket.Bind(e);
User is offlineProfile CardPM
+Quote Post

cygnusX
RE: Socket.Bind Problem
15 Nov, 2007 - 05:51 AM
Post #2

D.I.C Head
**

Joined: 19 May, 2007
Posts: 159



Thanked: 2 times
My Contributions
Ooops,my mistake.I don't covert anything,just initializing new IPAddress.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 09:18PM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month