mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-05 13:02:44 +13:00
Fix build
This commit is contained in:
parent
458748e6b0
commit
7fcaf412df
5 changed files with 21 additions and 27 deletions
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.8.45.0")]
|
||||
[assembly: AssemblyFileVersion("1.8.45.0")]
|
||||
[assembly: AssemblyVersion("1.8.46.0")]
|
||||
[assembly: AssemblyFileVersion("1.8.46.0")]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Package: hisp
|
||||
Version: 1.8.45
|
||||
Version: 1.8.46
|
||||
Depends: coreutils,systemd,mariadb-server,libsqlite3-dev,zlib1g-dev,libicu-dev,libkrb5-dev
|
||||
Maintainer: Li
|
||||
Homepage: https://islehorse.com
|
||||
|
|
|
@ -30,8 +30,8 @@ using System.Runtime.InteropServices;
|
|||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.8.45.0")]
|
||||
[assembly: AssemblyFileVersion("1.8.45.0")]
|
||||
[assembly: AssemblyVersion("1.8.46.0")]
|
||||
[assembly: AssemblyFileVersion("1.8.46.0")]
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ namespace HISP.Server.Network
|
|||
{
|
||||
public class Hybrid : Transport
|
||||
{
|
||||
|
||||
Transport actualTransport = null;
|
||||
|
||||
|
||||
|
@ -58,29 +57,24 @@ namespace HISP.Server.Network
|
|||
|
||||
public override void ProcessReceivedPackets(int available, byte[] buffer)
|
||||
{
|
||||
for (int i = 0; i < available; i++)
|
||||
base.currentPacket.Add(buffer[i]);
|
||||
|
||||
if (currentPacket.Count >= 3)
|
||||
if (ConfigReader.EnableWebSocket && WebSocket.IsStartOfHandshake(buffer))
|
||||
{
|
||||
if (ConfigReader.EnableWebSocket && WebSocket.IsStartOfHandshake(currentPacket.ToArray()))
|
||||
{
|
||||
Logger.InfoPrint(this.Ip + " Switching to WebSocket");
|
||||
actualTransport = new WebSocket();
|
||||
Logger.InfoPrint(this.Ip + " Switching to WebSocket");
|
||||
actualTransport = new WebSocket();
|
||||
|
||||
actualTransport.passObjects(this.socket, this.onReceiveCallback, this.onDisconnectCallback);
|
||||
actualTransport.ProcessReceivedPackets(available, buffer);
|
||||
actualTransport.Accept(base.socket, base.onReceiveCallback, base.onDisconnectCallback);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.InfoPrint(this.Ip + " Switching to XmlSocket");
|
||||
actualTransport = new XmlSocket();
|
||||
actualTransport.passObjects(this.socket, this.onReceiveCallback, this.onDisconnectCallback);
|
||||
actualTransport.ProcessReceivedPackets(available, buffer);
|
||||
actualTransport.Accept(base.socket, base.onReceiveCallback, base.onDisconnectCallback);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.InfoPrint(this.Ip + " Switching to XmlSocket");
|
||||
actualTransport = new XmlSocket();
|
||||
|
||||
actualTransport.passObjects(this.socket, this.onReceiveCallback, this.onDisconnectCallback);
|
||||
actualTransport.ProcessReceivedPackets(available, buffer);
|
||||
actualTransport.Accept(base.socket, base.onReceiveCallback, base.onDisconnectCallback);
|
||||
}
|
||||
actualTransport.passObjects(this.socket, this.onReceiveCallback, this.onDisconnectCallback);
|
||||
actualTransport.ProcessReceivedPackets(available, buffer);
|
||||
actualTransport.Accept(base.socket, base.onReceiveCallback, base.onDisconnectCallback);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ using System.Runtime.InteropServices;
|
|||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.8.45.0")]
|
||||
[assembly: AssemblyFileVersion("1.8.45.0")]
|
||||
[assembly: AssemblyVersion("1.8.46.0")]
|
||||
[assembly: AssemblyFileVersion("1.8.46.0")]
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue