Error reading data from socket AND Unexpected UDP I/O Error

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

kapacb
Posts: 11
Joined: 23 Feb 2011, 04:05

Error reading data from socket AND Unexpected UDP I/O Error

Postby kapacb » 23 Feb 2011, 04:11

Okay, I'm trying to initialize a UDP connection, but get an error.
[SFS DEBUG] UDPSocketLayer: Error reading data from socket: The remote host forcibly broke the existing connection.
[SFS DEBUG] Unexpected UDP I / O Error. Error reading data from socket: The remote host forcibly broke the existing connection.
[ConnectionReset]
What am I doing wrong?

Code: Select all

using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Text;
using Sfs2X;
using Sfs2X.Core;
using Sfs2X.Entities;
using Sfs2X.Requests;
using Sfs2X.Logging;


public class LobbyGUI : MonoBehaviour {

   private SmartFox smartFox;
   private string zone = "SimpleChat";
   private string serverName = "127.0.0.1";
   private int serverPort = 9933;
   private string username = "";
   private string loginErrorMessage = "";
   private bool isLoggedIn;
   private bool isJoining = false;
   
   
   private string newMessage = "";
   private ArrayList messages = new ArrayList();
   // Locker to use for messages collection to ensure its cross-thread safety
   private System.Object messagesLocker = new System.Object();
      
   public GUISkin gSkin;
   
   private Room currentActiveRoom;
            
   private Vector2 gameScrollPosition, userScrollPosition, chatScrollPosition;
   private int roomSelection = -1;
   private string[] roomNameStrings;
   private string[] roomFullStrings;
   private Rect windowRect;
   private bool showNewGameWindow;
   private string roomName = "";
   private int numMaxUsers = 4;

   void Awake() {
      Screen.showCursor = true;
      Screen.lockCursor = false;
   }
   
   void Start()
   {
      bool debug = false;
      if (SmartFoxConnection.IsInitialized)
      {
         smartFox = SmartFoxConnection.Connection;
      }
      else
      {
         smartFox = new SmartFox(debug);
      }
         
      smartFox.AddLogListener(LogLevel.INFO, OnDebugMessage);
   }
   
   private void AddEventListeners() {
      
      smartFox.RemoveAllEventListeners();
      
      smartFox.AddEventListener(SFSEvent.CONNECTION, OnConnection);
      smartFox.AddEventListener(SFSEvent.CONNECTION_LOST, OnConnectionLost);
      smartFox.AddEventListener(SFSEvent.LOGIN, OnLogin);
      smartFox.AddEventListener(SFSEvent.LOGIN_ERROR, OnLoginError);
      smartFox.AddEventListener(SFSEvent.LOGOUT, OnLogout);
      smartFox.AddEventListener(SFSEvent.ROOM_JOIN, OnJoinRoom);
      smartFox.AddEventListener(SFSEvent.PUBLIC_MESSAGE, OnPublicMessage);
      
      smartFox.AddEventListener(SFSEvent.ROOM_CREATION_ERROR, OnCreateRoomError);
      smartFox.AddEventListener(SFSEvent.USER_ENTER_ROOM, OnUserEnterRoom);
      smartFox.AddEventListener(SFSEvent.USER_EXIT_ROOM, OnUserLeaveRoom);
      smartFox.AddEventListener(SFSEvent.ROOM_ADD, OnRoomAdded);
      smartFox.AddEventListener(SFSEvent.ROOM_REMOVE, OnRoomDeleted);
      smartFox.AddEventListener(SFSEvent.USER_COUNT_CHANGE, OnUserCountChange);
      smartFox.AddEventListener(SFSEvent.UDP_INIT, OnUdpInit);
   }
   
   void FixedUpdate() {
      smartFox.ProcessEvents();
   }
   
   private void UnregisterSFSSceneCallbacks() {
      // This should be called when switching scenes, so callbacks from the backend do not trigger code in this scene
      smartFox.RemoveAllEventListeners();
   }
   
   public void OnConnection(BaseEvent evt) {
      bool success = (bool)evt.Params["success"];
      string error = (string)evt.Params["errorMessage"];
      
      Debug.Log("On Connection callback got: " + success + " (error : <" + error + ">)");

      if (success) {
         SmartFoxConnection.Connection = smartFox;

         Debug.Log("Sending login request");
         smartFox.Send(new LoginRequest(username, "", zone));

      }
   }

   public void OnConnectionLost(BaseEvent evt) {
      Debug.Log("OnConnectionLost");
      isLoggedIn = false;
      isJoining = false;
      currentActiveRoom = null;
      UnregisterSFSSceneCallbacks();
   }

   // Various SFS callbacks
   public void OnLogin(BaseEvent evt) {
      try {
         bool success = true;
         if (evt.Params.ContainsKey("success") && !(bool)evt.Params["success"]) {
            loginErrorMessage = (string)evt.Params["errorMessage"];
            Debug.Log("Login error: "+loginErrorMessage);
         }
         else {
            Debug.Log("Logged in successfully");

            // Startup up UDP
            smartFox.InitUDP(serverName, serverPort);
         }
      }
      catch (Exception ex) {
         Debug.Log("Exception handling login request: "+ex.Message+" "+ex.StackTrace);
      }
   }

   public void OnLoginError(BaseEvent evt) {
      Debug.Log("Login error: "+(string)evt.Params["errorMessage"]);
   }
   
   public void OnUdpInit(BaseEvent evt) {
      if (evt.Params.ContainsKey("success") && !(bool)evt.Params["success"]) {
         loginErrorMessage = (string)evt.Params["errorMessage"];
         Debug.Log("UDP error: "+loginErrorMessage);
      } else {
         Debug.Log("UDP ok");
         PrepareLobby();   
      }
   }
   
   void OnLogout(BaseEvent evt) {
      Debug.Log("OnLogout");
      isLoggedIn = false;
      isJoining = false;
      currentActiveRoom = null;
      smartFox.Disconnect();
   }
   
   public void OnDebugMessage(BaseEvent evt) {
      string message = (string)evt.Params["message"];
      Debug.Log("[SFS DEBUG] " + message);
   }

   public void OnJoinRoom(BaseEvent evt)
   {
      Room room = (Room)evt.Params["room"];
      currentActiveRoom = room;
      // If we joined a game room, then we either created it (and auto joined) or manually selected a game to join
      if (room.IsGame) {
         Debug.Log ("Joined game room " + room.Name);
         UnregisterSFSSceneCallbacks();
         Application.LoadLevel("game");
      }
   }

   
   public void OnCreateRoomError(BaseEvent evt) {
      string error = (string)evt.Params["errorMessage"];
      Debug.Log("Room creation error; the following error occurred: " + error);
   }

   public void OnUserEnterRoom(BaseEvent evt) {
      User user = (User)evt.Params["user"];
      lock (messagesLocker) {
         messages.Add(user.Name + " joined room");
      }
   }

   private void OnUserLeaveRoom(BaseEvent evt) {
      User user = (User)evt.Params["user"];
      lock (messagesLocker) {
         messages.Add(user.Name + " left room");
      }
   }

   public void OnRoomAdded(BaseEvent evt) {
      Room room = (Room)evt.Params["room"];
      // Update view (only if room is game)
      if ( room.IsGame ) {
         SetupRoomList();
      }
   }
   
   public void OnUserCountChange(BaseEvent evt) {
      Room room = (Room)evt.Params["room"];
      if (room.IsGame ) {
         SetupRoomList();
      }
   }

   /*
   * Handle a room that was removed
   */
   public void OnRoomDeleted(BaseEvent evt) {
      SetupRoomList();
   }

   void OnPublicMessage(BaseEvent evt) {
      try {
         string message = (string)evt.Params["message"];
         User sender = (User)evt.Params["sender"];
   
         // We use lock here to ensure cross-thread safety on the messages collection
         lock (messagesLocker) {
            messages.Add(sender.Name + " said " + message);
         }
         
         chatScrollPosition.y = Mathf.Infinity;
         Debug.Log("User " + sender.Name + " said: " + message);
      }
      catch (Exception ex) {
         Debug.Log("Exception handling public message: "+ex.Message+ex.StackTrace);
      }
   }

   
   
   // Finally draw all the lobby GUI
   void OnGUI()
   {
      if (smartFox == null) return;
      GUI.skin = gSkin;
      
      int screenW = Screen.width;
      int screenH = Screen.height;
   
      GUI.Label(new Rect(2, -2, 680, 70), "", "SFSLogo");   
      
            
      // Login
      if (!isLoggedIn) {
         GUI.Label(new Rect(10, 90, 100, 100), "Username: ");
         username = GUI.TextField(new Rect(100, 90, 200, 20), username, 25);
         
         GUI.Label(new Rect(10, 120, 100, 100), "Invert Mouse Y: ");
         OptionsManager.InvertMouseY = GUI.Toggle(new Rect(100, 120, 200, 20), OptionsManager.InvertMouseY, "");
         
         GUI.Label(new Rect(10, 180, 100, 100), "Server: ");
         serverName = GUI.TextField(new Rect(100, 180, 200, 20), serverName, 25);

         GUI.Label(new Rect(10, 210, 100, 100), "Port: ");
         serverPort = int.Parse(GUI.TextField(new Rect(100, 210, 200, 20), serverPort.ToString(), 4));

         GUI.Label(new Rect(10, 240, 100, 100), loginErrorMessage);

         if (GUI.Button(new Rect(100, 270, 100, 24), "Login")  || (Event.current.type == EventType.keyDown && Event.current.character == '\n'))
         {
            AddEventListeners();
            smartFox.Connect(serverName, serverPort);
         }
      }
      else if (isJoining)
      {
         // Standard view
         if (GUI.Button(new Rect(580, 478, 90, 24), "Logout"))
         {
            smartFox.Send( new LogoutRequest() );
         }

         GUI.Label(new Rect(498, 248, 180, 40), "Joining room");
      }
      else if (currentActiveRoom!=null)
      {
         // New game window
         if (showNewGameWindow) {
            windowRect = GUI.Window (0, windowRect, WindowFunction, "");
            return;
         }
         
         // User list
         GUI.Box (new Rect (screenW - 200, 80, 180, 170), "Users");
         GUILayout.BeginArea (new Rect (screenW - 190, 110, 150, 160));
         userScrollPosition = GUILayout.BeginScrollView (userScrollPosition, GUILayout.Width (150), GUILayout.Height (130));
         GUILayout.BeginVertical ();
         
         List<User> userList = currentActiveRoom.UserList;
         
         foreach (User user in userList) {
            GUILayout.Label (user.Name);
         }
         GUILayout.EndVertical ();
         GUILayout.EndScrollView ();
         GUILayout.EndArea ();
         
         
         // Game room list
         GUI.Box (new Rect (screenW - 200, 260, 180, 200), "Game List");
         GUILayout.BeginArea (new Rect (screenW - 190, 290, 150, 130));
         if (smartFox.RoomList.Count != 1) {
            // We always have 1 non-game room - Main Lobby
            gameScrollPosition = GUILayout.BeginScrollView (gameScrollPosition, GUILayout.Width (150), GUILayout.Height (160));
            
            roomSelection = GUILayout.SelectionGrid (roomSelection, roomFullStrings, 1, "RoomListButton");
            if (roomSelection >= 0 && roomNameStrings[roomSelection] != currentActiveRoom.Name) {
               smartFox.Send(new JoinRoomRequest(roomNameStrings[roomSelection], null, smartFox.LastJoinedRoom.Id));
            }
            GUILayout.EndScrollView ();
            
         } else {
            GUILayout.Label ("No games available to join");
         }
         GUILayout.EndArea ();
         
         if (GUI.Button (new Rect (screenW - 200, 480, 85, 24), "New game")) {
            showNewGameWindow = true;
         }
         
         
         // Standard view
         if (GUI.Button (new Rect (screenW - 105, 480, 85, 24), "Logout")) {
            smartFox.Send( new LogoutRequest());
         }
                  
         // Chat history
         GUI.Box(new Rect(10, 80, 470, 390), "Chat");

         GUILayout.BeginArea (new Rect(20, 110, 450, 350));
            chatScrollPosition = GUILayout.BeginScrollView (chatScrollPosition, GUILayout.Width (450), GUILayout.Height (350));
               GUILayout.BeginVertical();
               
               // We use lock here to ensure cross-thread safety on the messages collection
               lock (messagesLocker) {
                  foreach (string message in messages)
                  {
                     GUILayout.Label(message);
                  }
               }
         
               GUILayout.EndVertical();
            GUILayout.EndScrollView ();
         GUILayout.EndArea();

         // Send message
         newMessage = GUI.TextField(new Rect(10, 480, 370, 20), newMessage, 50);
         if (GUI.Button(new Rect(390, 478, 90, 24), "Send")  || (Event.current.type == EventType.keyDown && Event.current.character == '\n'))
         {
            smartFox.Send( new PublicMessageRequest(newMessage) );
            newMessage = "";
         }
               
      }
   }
   
   private void PrepareLobby() {
      SetupRoomList();
      windowRect = new Rect (Screen.width / 2 - 160, Screen.height / 2 - 75, 320, 150);
      showNewGameWindow = false;
      isLoggedIn = true;
   }
   
   
   private void WindowFunction (int windowID) {
      GUI.Box (new Rect (0, 0, 310, 150), "Create New Game");
      GUI.BeginGroup (new Rect (10, 40, 310, 110));
      
      // Room name row
      GUI.Label (new Rect (0, 5, 80, 20), "Game name: ");
      if (roomName.Equals ("")) {
         roomName = smartFox.MySelf.Name + " game";
      }
      roomName = GUI.TextField (new Rect (new Rect (100, 5, 180, 20)), roomName);
      
      // Max players row
      GUI.Label (new Rect (0, 35, 80, 20), "Max players: ");
      int tempMaxUsers;
      if (int.TryParse (GUI.TextField (new Rect (100, 35, 80, 20), numMaxUsers.ToString (), 2), out tempMaxUsers)) {
         numMaxUsers = tempMaxUsers;
      }
      
      // Button row
      if (GUI.Button (new Rect (0, 70, 80, 20), "New game")) {
         showNewGameWindow = false;
         
         if (roomName.Equals("")) {
            roomName = smartFox.MySelf.Name + " game";
         }
         /* TODO - create the room correctly
         NewRoomDescriptor roomObj = new NewRoomDescriptor (roomName, numMaxUsers, true, 0, new ArrayList (), new NewRoomDescriptor.ExtensionDescriptor ("fpsExtension", "dk.fullcontrol.fpsdemo.FpsExtension"), "", true, true);
         smartFox.CreateRoom (roomObj);
         */
                     
         
         RoomSettings settings = new RoomSettings(roomName);
         settings.GroupId = "game";
         settings.IsGame = true;
         settings.MaxUsers = (short)numMaxUsers;
         settings.MaxSpectators = 0;
         settings.Extension = new RoomExtension(NetworkManager.ExtName, NetworkManager.ExtClass);
         smartFox.Send(new CreateRoomRequest(settings, true, smartFox.LastJoinedRoom));
      }
      if (GUI.Button (new Rect (100, 70, 80, 20), "Cancel")) {
         showNewGameWindow = false;
      }
      GUI.EndGroup ();
   }
   
   private void SetupRoomList () {
      List<string> rooms = new List<string> ();
      List<string> roomsFull = new List<string> ();
      
      List<Room> allRooms = smartFox.RoomManager.GetRoomList();
      
      foreach (Room room in allRooms) {
         // Only show game rooms
         if (!room.IsGame) {
            continue;
         }
         
         Debug.Log ("Room id: " + room.Id + " has name: " + room.Name);
         
         rooms.Add(room.Name);
         roomsFull.Add(room.Name + " (" + room.UserCount + "/" + room.MaxUsers + ")");
      }
      
      roomNameStrings = rooms.ToArray();
      roomFullStrings = roomsFull.ToArray();
      
      if (smartFox.LastJoinedRoom==null) {
         smartFox.Send(new JoinRoomRequest("The Lobby"));
      }
   }
}
kapacb
Posts: 11
Joined: 23 Feb 2011, 04:05

Postby kapacb » 23 Feb 2011, 05:40

OMG, I'm sorry, in the admin panel in the server configuration, it was necessary to add the UDP protocol. The question is closed.
novagelida
Posts: 2
Joined: 20 Apr 2012, 09:14

Re: Error reading data from socket AND Unexpected UDP I/O Er

Postby novagelida » 22 Apr 2012, 11:52

I'm having the same issue but I really don't know why...

These are the errors:
Debug message: UDPSocketLayer: Error reading data from socket: The remote host forcibly broke the existing connection.
Debug message: Unexpected UDP I/O Error. Error reading data from socket: The remote host forcibly broke the existing connection.

After 3 attempts the udp connection fails.

I'm using win 7 x64, NO FIREWALL AT ALL, udp setted up on server.
This is my Server/Zone configuration.

Schermata del 2012-04-22 13-35-03.png
(58.48 KiB) Not downloaded yet

Schermata del 2012-04-22 13-34-44.png
(48.24 KiB) Not downloaded yet


This is the script I use to connect with udp.

Code: Select all

using UnityEngine;
using System.Collections;
using Sfs2X;
using Sfs2X.Core;
using Sfs2X.Logging;
using Sfs2X.Entities;
using Sfs2X.Requests;
using Sfs2X.Entities.Data;
using System.Security.Cryptography;
using System.Text;

public class LogInManager : MonoBehaviour {
   
   public string server_address = "192.168.1.129";
   public int server_port = 9933;
   private string starting_zone = "Global";
   private SmartFox sfserver;
   public LogLevel loglevel = LogLevel.DEBUG;  //tipo di file di log da scrivere
   //private string connectionStatus;  //potrebbe servire per salvare lo stato della connessione sul log del server o sulla gui
   
   //temporanee, quando avremo la GUI queste variabili verranno riempite dall'utente
   private string user_name = "***";
   private string password = "***";
   
   // Use this for initialization
   void Start () {
      sfserver = new SmartFox(true); //il parametro al costruttore indica che dobbiamo fare debug
      
      //aggiungo i listener per le callback. I parametri sono: evento, funzione che lo gestisce
      sfserver.AddEventListener(SFSEvent.CONNECTION, OnConnection);
      sfserver.AddEventListener(SFSEvent.CONNECTION_LOST, OnConnectionLost);
      sfserver.AddEventListener(SFSEvent.LOGIN, OnLogin);
      sfserver.AddEventListener(SFSEvent.LOGIN_ERROR, OnLoginError);
      sfserver.AddEventListener(SFSEvent.ROOM_JOIN, OnRoomJoin);
      sfserver.AddEventListener(SFSEvent.LOGOUT, OnLogout);
      sfserver.AddEventListener(SFSEvent.EXTENSION_RESPONSE, OnExtensionResponse);
      sfserver.AddEventListener(SFSEvent.UDP_INIT, onUdpInit);
      
      //aggiungo il listener per le cose da scrivere nel log
      sfserver.AddLogListener(loglevel, OnDebugMessage);
      
      //eseguo la connect
      sfserver.Connect(server_address, server_port);   
   }
   
   //Ad intervalli di tempo fissi. L'update normale dipende dal framerate che è variabile
   void FixedUpdate() {
      //se il server è ancora attivo deve processare ogni evento di callback
      if (sfserver != null){
         sfserver.ProcessEvents();
      }
   }
   
   //Handler dell'evento CONNECTION
   public void OnConnection(BaseEvent e) {
      bool res = (bool)e.Params["success"];
      string er = (string)e.Params["errorMessage"];
      
      Debug.Log("Esito connessione: "+res+"; errore: "+er);
      
      if (res){
         SmartFoxConnection.Connection = sfserver;  //salva l'istanza del server in questa classe statica in modo da poterla condividere
         //connectionStatus = "Connection succesful!";
         
         //mando user name e password codificata con MD5
         Debug.Log("Invio richiesta di login");
         
         MD5 encripter = MD5.Create(); //creo un istanza dell'algoritmo di cifratura
         byte[] data = encripter.ComputeHash(Encoding.Default.GetBytes(password)); //codifico la password che diventa un array di byte
         //ritrasformo data in una stringa
         StringBuilder sBuilder = new StringBuilder();
           for (int i = 0; i < data.Length; i++)
           {
                 sBuilder.Append(data[i].ToString("x2"));
           }
      
         sfserver.Send(new LoginRequest(user_name, sBuilder.ToString(), starting_zone));
      } else {
         //connectionStatus = "Can't connect to server!";
      }
   }
   
   public void OnConnectionLost(BaseEvent e) {
      Debug.Log("Connession persa!");
      //connectionStatus = "Connection was lost: "+(string)e.Params["reason"];
      //funzione che potrebbe servire a modificare la gui
   }
   
   public void OnLogin(BaseEvent e) {
      Debug.Log("Login effettuato con successo!");
      
      //Apro un canale udp
      sfserver.InitUDP(server_address, 9955);
      
      //invio la richiesta per la character list
      SFSObject reqObj = new SFSObject();
         reqObj.PutUtfString("username", user_name);
      sfserver.Send(new ExtensionRequest("sendCharacterList", reqObj));
      Debug.Log("Richiesta character list inviata!");
   }
   
   public void OnLoginError(BaseEvent e) {
      Debug.Log("Errore al login: "+(string)e.Params["errorMessage"]);
      //funzione che potrebbe servire a modificare la gui
   }
   
   public void OnRoomJoin(BaseEvent e) {
      Debug.Log("Room joinata con successo");

      //Una volta che la room è stata joinata i listener non servono più e vengono rimossi.
      //Viene caricata la scena di gioco
//      sfserver.RemoveAllEventListeners();
//      Application.LoadLevel("AutoMaze-Mode");
   }
   
   public void OnLogout(BaseEvent e) {
      Debug.Log("Logout");
      //funzione che potrebbe servire a modificare la gui
   }
   
   public void OnDebugMessage(BaseEvent e) {
      string message = (string)e.Params["message"];
      Debug.Log("messaggio di debug: " + message);
   }
   
   public void onUdpInit(BaseEvent e) {
      if ((bool)e.Params["success"])
      {
         Debug.Log("Canale UDP stabilito!");
         sfserver.RemoveAllEventListeners();
         Application.LoadLevel("AutoMaze-Mode");
      }
      else
      {
         Debug.Log("UDP fails!");
      }
   }
   
   //funzione che riceve tutti i personaggi dell'utente loggato
   public void OnExtensionResponse(BaseEvent e) {
      if ((string)e.Params["cmd"] == "sendCharacterList")
      {
         ISFSObject data_obj = (SFSObject)e.Params["params"];
         ISFSArray character_aray = data_obj.GetSFSArray("character");
      
         Debug.Log("Lista dei personaggi ricevuta!");
         
         for (int i = 0; i < character_aray.Count; i++){
            
            ISFSObject item = character_aray.GetSFSObject(i);
            Debug.Log("character: "+item.GetUtfString("name"));
         }
         
         //Selezione del personaggio
         SFSObject reqObj = new SFSObject();
         //il personaggio verrà scelto dalla gui
         string selectedCharacter = "saro";
            reqObj.PutUtfString("selectedCharacter", selectedCharacter);
         
         sfserver.Send(new ExtensionRequest("sendSelectedCharacter", reqObj));
         Debug.Log("Character selezionato. In attesa che il server fornisca i dati...");
         
      } else if ((string)e.Params["cmd"] == "sendSelectedCharacter")
      {
         ISFSObject data_obj = (SFSObject)e.Params["params"];
         ISFSArray selected_character_aray = data_obj.GetSFSArray("selectedCharacter");
         ISFSObject item = selected_character_aray.GetSFSObject(0);
         Debug.Log("Character loaded: "+item.GetUtfString("name")+" ("+item.GetInt("level")+")");
         
         //E' necessario creare una room se non esiste o joinarla se esiste
         if (sfserver.RoomManager.ContainsRoom("General")) {
            sfserver.Send(new JoinRoomRequest("General"));
            
         } else {
            RoomSettings settings = new RoomSettings("General");
            settings.MaxUsers = 20;
         
            sfserver.Send(new CreateRoomRequest(settings, true));
         }
      } else {
         Debug.Log("ricevuti dati non gestibili da "+(string)e.Params["cmd"]);
      }
   }
}


Can you help me please? I'm really stressed because I've to finish all the project in about 48h and it still doesn't work :(
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Re: Error reading data from socket AND Unexpected UDP I/O Er

Postby ThomasLund » 22 Apr 2012, 16:19

Does it work when you do not use UDP at all?

Just wondering about the server IP - in your server you only bind it to 127.0.0.1, but your script connects to 192.168.1.129

/T
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
novagelida
Posts: 2
Joined: 20 Apr 2012, 09:14

Re: Error reading data from socket AND Unexpected UDP I/O Er

Postby novagelida » 23 Apr 2012, 14:02

ThomasLund wrote:Does it work when you do not use UDP at all?

Yes it works with tcp

ThomasLund wrote:Just wondering about the server IP - in your server you only bind it to 127.0.0.1, but your script connects to 192.168.1.129

/T


It's the ip of a virtual machine. No firewall also in the virtual machine....

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 74 guests