Click here to Skip to main content
16,005,181 members
Home / Discussions / C#
   

C#

 
AnswerRe: accessing anonymous websites using c#.net Pin
Colin Angus Mackay20-Nov-07 2:58
Colin Angus Mackay20-Nov-07 2:58 
GeneralRe: accessing anonymous websites using c#.net Pin
martin_hughes20-Nov-07 4:59
martin_hughes20-Nov-07 4:59 
QuestionP2P Pin
lockepeak20-Nov-07 1:48
lockepeak20-Nov-07 1:48 
AnswerRe: P2P Pin
Anthony Mushrow20-Nov-07 2:10
professionalAnthony Mushrow20-Nov-07 2:10 
Questionwindow Appliction using c#.net Pin
sivaramireddy p20-Nov-07 1:12
sivaramireddy p20-Nov-07 1:12 
AnswerRe: window Appliction using c#.net Pin
Anthony Mushrow20-Nov-07 1:18
professionalAnthony Mushrow20-Nov-07 1:18 
GeneralRe: window Appliction using c#.net Pin
sivaramireddy p20-Nov-07 1:46
sivaramireddy p20-Nov-07 1:46 
GeneralRe: window Appliction using c#.net Pin
Anthony Mushrow20-Nov-07 2:06
professionalAnthony Mushrow20-Nov-07 2:06 
Well, you make a connection to the other machine by use of IP and port number. For example, on the server side you could wait for a connection, and then send out some data:

//Listen for connection
TcpListener listener = new TcpListener(IPAddress.Any, 1234);

//get socket from incomming connection
Socket mySocket = listener.AcceptSocket();

//Send the number 5
byte[] data = {0x5};
mySocket.Send(data);


And the client side would make a connection, and then wait for some data:

//Make a socket
Socket mySocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
//Connect to the server (assuming IP address to be 192.168.1.1)
mySocket.Connect(IPAdress.Parse("192.168.1.1"), 1234);

//Set up the buffer
byte[] buffer = new byte[1024];
//receive some data
int dataLength = mySocket.Receive(buffer);

//and then you can read the buffer to see what data you just received. 
//dataLength will tell you how many bytes you received, so in this case, it would be 1.


You can of course use the mighty powers of google to find what your looking for, or type 'socket' into the search bar up there.

My current favourite word is: PIE!

Good ol' pie, it's been a while.

Questiondeveloping Windows Application and using HttpWebRequest Pin
sivaramireddy p20-Nov-07 1:00
sivaramireddy p20-Nov-07 1:00 
AnswerRe: developing Windows Application and using HttpWebRequest Pin
Sun Rays20-Nov-07 1:39
Sun Rays20-Nov-07 1:39 
GeneralRe: developing Windows Application and using HttpWebRequest Pin
sivaramireddy p20-Nov-07 1:44
sivaramireddy p20-Nov-07 1:44 
AnswerRe: developing Windows Application and using HttpWebRequest Pin
Dan Neely20-Nov-07 5:06
Dan Neely20-Nov-07 5:06 
QuestionFile Properties Pin
half-life20-Nov-07 0:01
half-life20-Nov-07 0:01 
AnswerRe: File Properties Pin
Sun Rays20-Nov-07 0:14
Sun Rays20-Nov-07 0:14 
GeneralRe: File Properties Pin
half-life20-Nov-07 2:02
half-life20-Nov-07 2:02 
QuestionReg: Multithreading [modified] Pin
Satish - Developer19-Nov-07 23:57
Satish - Developer19-Nov-07 23:57 
AnswerRe: Reg: Multithreading Pin
J4amieC20-Nov-07 0:13
J4amieC20-Nov-07 0:13 
GeneralRe: Reg: Multithreading Pin
Satish - Developer20-Nov-07 0:15
Satish - Developer20-Nov-07 0:15 
GeneralRe: Reg: Multithreading Pin
J4amieC20-Nov-07 0:38
J4amieC20-Nov-07 0:38 
GeneralRe: Reg: Multithreading Pin
Martin#20-Nov-07 0:48
Martin#20-Nov-07 0:48 
GeneralRe: Reg: Multithreading Pin
J4amieC20-Nov-07 1:08
J4amieC20-Nov-07 1:08 
GeneralRe: Reg: Multithreading Pin
led mike20-Nov-07 5:04
led mike20-Nov-07 5:04 
Question@"dadada da da:)" Pin
Muammar©19-Nov-07 23:18
Muammar©19-Nov-07 23:18 
AnswerRe: @"dadada da da:)" Pin
szukuro20-Nov-07 1:10
szukuro20-Nov-07 1:10 
QuestionResource in separate project? Pin
Snowjim19-Nov-07 23:17
Snowjim19-Nov-07 23:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.