- Joined
- May 17, 2007
- Messages
- 2,474
- Reaction score
- 681
Hi,
Lately I've made a switch from Java to C#, cause of the similar functions and syntax (well, for the most part). So far, I'm enjoying the switch and it is a bit easier to program with the VS10 development environment.
So anyways, been trying to find out a similar function of Java's socket read write etc
The following is needed in Java:
And the following in C#:
So now, the problem i have is i do not know the read and write functions that are similar to this in C# (this code is in written in java):
The two fields in java:
Are equal to in C#:
Can anybody telling me the corresponding methods in C# for the following?:
SocketListener:
ConnectionManager:
Lately I've made a switch from Java to C#, cause of the similar functions and syntax (well, for the most part). So far, I'm enjoying the switch and it is a bit easier to program with the VS10 development environment.
So anyways, been trying to find out a similar function of Java's socket read write etc
The following is needed in Java:
Code:
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
Code:
using System.IO;
using System.Net.Sockets;
You must be registered to see links
The two fields in java:
Code:
[LIST=1]
[*] public [URL="http://www.google.com/search?hl=en&q=allinurl%3AInputStream+java.sun.com&btnI=I%27m%20Feeling%20Lucky"]InputStream[/URL] input;
[*] public [URL="http://www.google.com/search?hl=en&q=allinurl%3AOutputStream+java.sun.com&btnI=I%27m%20Feeling%20Lucky"]OutputStream[/URL] output;
[/LIST]
Code:
public Stream mStream
Code:
[LIST=1]
[*] input = socket.getInputStream();
[*] output = socket.getOutputStream();
[/LIST]
You must be registered to see links
ConnectionManager:
You must be registered to see links