public ServerSession(string token, string fbId, string flashRevision = "14446") { _token = token; _fbId = fbId; _flashRevision = flashRevision; _netConnection = new FluorineFx.Net.NetConnection(); _netConnection.ObjectEncoding = FluorineFx.ObjectEncoding.AMF3; _netConnection.AddHeader("Accept-Encoding", true, "gzip, deflate"); _netConnection.NetStatus += new FluorineFx.Net.NetStatusHandler(_netConnection_NetStatus); _netConnection.Connect("http://fb-0.farmville.com/flashservices/gateway.php"); }
public void BeginWork() { if (_ChatID != 0) { Header = "Подключение к: " + StreamerNick; _NetConnection = new FluorineFx.Net.NetConnection() { ObjectEncoding = FluorineFx.ObjectEncoding.AMF0 }; _NetConnection.Client = this; _NetConnection.OnConnect += _NetConnection_OnConnect; _NetConnection.OnDisconnect += _NetConnection_OnDisconnect; _NetConnection.NetStatus += _NetConnection_NetStatus; _NetConnection.Connect(ChatUri, _UserId, _UserToken, _ChatID); } }
private void Reconnect() { if (_NetConnection != null) { _NetConnection.Close(); _NetConnection = null; } BeginWork(); }