Thursday 15 July 2010

c# - Getting Windows Store Sockets to chat with Netcat? -


Using Windows.Networking.Sockets API, trying to get a basic interface working for the Windows Store I am here. So far I have this:

  Public Axis zero test () ((var socket = new StreamSocket ()) {socket.Control.KeepAlive = false; socket. Connect Async (New hostname ("192.168.1.1"), "5555", Socket Security Lievel.PlainsSocket;); (Var using author = new data witter (socket.OutputStream)) {writer.UnicodeEncoding = UnicodeEncoding.Utf8; Writer.WriteString ("yes!"); //writer.WriteByte (0x50); // does not work either to send raw ASCII var t = writer.FlushAsync (); while (T. position! = Asynstats // maybe needing?}}}   

So far, I see a successful connect and disconnect. However, I have never received any text.

My NetKat Command Running under the openBSD router)

  $ nc -lv 5555   

If I do not have NetNet, when I run the test function, then this one What is wrong with me here?

This is the case for me Shri way makes no sense, but apparently StoreAsync is required on Data Waitr I would have thought that was flush should be said, but apparently not. Another fun part about WinRT API is using my specific code:

  (var socket = new streamsocket ()) {socket.Control.KeepAlive = false; Socket Control. Wait for the socket Connect Async (New hostname ("192.168.1.1"), "5555", Socket Security Lievel.PlainsSocket); (Using Var = new data witter (socket.OutputStream)) {writer.UnicodeEncoding = UnicodeEncoding.Utf8; Writer.WriteString ("Yes!"); Wait for the author. StereSync (); }}    

No comments:

Post a Comment