• RSS
  • Twitter
  • FaceBook

Security Forums

Log in

FAQ | Search | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

C# - Won't connect to host...

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More

View previous topic :: View next topic  
Author Message
Dragonz31
Just Arrived
Just Arrived


Joined: 20 Jun 2005
Posts: 1


Offline

PostPosted: Sat Feb 04, 2006 9:50 pm    Post subject: C# - Won't connect to host... Reply with quote

I'm trying to program my application to connect to a remote host and send it data... So far, for the network part of my application, I have:

Code:
...
Socket sock = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
IPAddress ip_addr = IPAddress.Parse(ip);
IPEndPoint ip_ep = new IPEndPoint(ip_addr.Address, port);
byte[] data = Encoding.ASCII.GetBytes(test_data);
sock.Send(data);
byte[] buffer = new byte[1000];
recieved = sock.Receive(buffer);
...


It just waits for it to send the data and does nothing. Why?
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> Programming and More All times are GMT + 2 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Area

Log in | Register