Use Mono Api with monotouch.
Posted: 24 Nov 2011, 09:09
Can i use Mono Api with Mono Touch ?
I try to use it in mono touch, but onConnection Handler not start.
BUT THEN I CLOSE APP, server log write: remove socket channel it means its connected but onConnection not started. PLEASE HELP
MY LOG HERE:
log: [ RECEIVED ]: <cross-domain-policy><allow-access-from domain='*' to-ports='9339' /></cross-domain-policy>, (len: 91)
log: [ RECEIVED ]: <msg t='sys'><body action='apiOK' r='0'></body></msg>, (len: 53)
log: Disconnect due to lost socket connection
log: Disconnect Exception: System.Net.Sockets.SocketException: The socket is not connected
at System.Net.Sockets.Socket.Shutdown (SocketShutdown how) [0x00058] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:1432
at SmartFoxClientAPI.SmartFoxClient.Disconnect () [0x00000] in <filename unknown>:0
Trying to call onConnectionLost, but no callback is registered
Terminating in response to SpringBoard's termination.
MY CODE HERE:
[code]using MonoTouch.UIKit;
using System.Drawing;
using System;
using MonoTouch.Foundation;
using SmartFoxClientAPI;
using SmartFoxClientAPI.Handlers;
namespace PokerIosMobile1_2
{
public partial class HomeViewController : UIViewController
{
SelectLoginView selectLoginView; //Окно выбора типа входа - 2
//----------------------------------------------------------
// SmartFox Setup variables
//----------------------------------------------------------
private string ip = "192.168.105.193";
private int port = 9339;
//private string statusMessage = "";
static bool UserInterfaceIdiomIsPhone {
get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone; }
}
public HomeViewController ()
: base (UserInterfaceIdiomIsPhone ? "HomeViewController_iPhone" : "HomeViewController_iPad", null)
{
}
public override void DidReceiveMemoryWarning ()
{
// Releases the view if it doesn't have a superview.
base.DidReceiveMemoryWarning ();
// Release any cached data, images, etc that aren't in use.
}
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
//Ð
I try to use it in mono touch, but onConnection Handler not start.
BUT THEN I CLOSE APP, server log write: remove socket channel it means its connected but onConnection not started. PLEASE HELP
MY LOG HERE:
log: [ RECEIVED ]: <cross-domain-policy><allow-access-from domain='*' to-ports='9339' /></cross-domain-policy>, (len: 91)
log: [ RECEIVED ]: <msg t='sys'><body action='apiOK' r='0'></body></msg>, (len: 53)
log: Disconnect due to lost socket connection
log: Disconnect Exception: System.Net.Sockets.SocketException: The socket is not connected
at System.Net.Sockets.Socket.Shutdown (SocketShutdown how) [0x00058] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:1432
at SmartFoxClientAPI.SmartFoxClient.Disconnect () [0x00000] in <filename unknown>:0
Trying to call onConnectionLost, but no callback is registered
Terminating in response to SpringBoard's termination.
MY CODE HERE:
[code]using MonoTouch.UIKit;
using System.Drawing;
using System;
using MonoTouch.Foundation;
using SmartFoxClientAPI;
using SmartFoxClientAPI.Handlers;
namespace PokerIosMobile1_2
{
public partial class HomeViewController : UIViewController
{
SelectLoginView selectLoginView; //Окно выбора типа входа - 2
//----------------------------------------------------------
// SmartFox Setup variables
//----------------------------------------------------------
private string ip = "192.168.105.193";
private int port = 9339;
//private string statusMessage = "";
static bool UserInterfaceIdiomIsPhone {
get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone; }
}
public HomeViewController ()
: base (UserInterfaceIdiomIsPhone ? "HomeViewController_iPhone" : "HomeViewController_iPad", null)
{
}
public override void DidReceiveMemoryWarning ()
{
// Releases the view if it doesn't have a superview.
base.DidReceiveMemoryWarning ();
// Release any cached data, images, etc that aren't in use.
}
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
//Ð