Changeset 7155 for 2015/koodauskerho


Ignore:
Timestamp:
2016-04-16 22:39:31 (4 years ago)
Author:
sieerinn
Message:

Koodin siistimistä.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2015/koodauskerho/sieerinn/TasohyppelyNettipeli/TasohyppelyNettipeli/TasohyppelyNettipeli/NetworkConnection.cs

    r7144 r7155  
    5858        try 
    5959        { 
    60             client.Connect(ip, port); // TODO: try 
    61         } catch (SocketException ex) 
     60            client.Connect(ip, port); 
     61        } 
     62        catch (SocketException) 
    6263        { 
    6364            return false; 
     
    8586    private void Send(MessageType type, string message = "") 
    8687    { 
    87         //var mstream = new MemoryStream(); 
    88         //var writer = new BinaryWriter(mstream); 
    89  
    90         //writer.Write((byte)type); 
    91         //writer.Write(guidBytes, 0, guidBytes.Length); 
    92         //writer.Write(gameName); 
    93         //if (message.Length > 0) 
    94         //    writer.Write(message); 
    95  
    96         //var sendBytes = mstream.ToArray(); 
    97         //var lengthBytes = BitConverter.GetBytes(IPAddress.HostToNetworkOrder(sendBytes.Length)); 
    98  
    99         //networkStream.Write(lengthBytes, 0, lengthBytes.Length); 
    100         //networkStream.Write(sendBytes, 0, sendBytes.Length); 
    101         //networkStream.Flush(); 
    102  
    10388        var builder = new StringBuilder(); 
    10489 
Note: See TracChangeset for help on using the changeset viewer.