public override void Start() { host = platform.EnetCreateHost(); platform.EnetHostInitialize(host, null, 1, 0, 0, 0); tosend = new QueueINetOutgoingMessage(); messages = new QueueNetIncomingMessage(); }
public override void Start() { host = new EnetHostNative() { host = new ENet.Host() }; ((EnetHostNative)host).host.InitializeServer(Port, 256); }
public abstract void EnetHostInitializeServer(EnetHost host, int port, int peerLimit);
public abstract bool EnetHostService(EnetHost host, int timeout, EnetEventRef enetEvent);
public abstract void EnetHostInitialize(EnetHost host, IPEndPointCi address, int peerLimit, int channelLimit, int incomingBandwidth, int outgoingBandwidth);
public abstract EnetPeer EnetHostConnect(EnetHost host, string hostName, int port, int data, int channelLimit);
public override EnetPeer EnetHostConnect(EnetHost host, string hostName, int port, int data, int channelLimit) { EnetHostNative host_ = (EnetHostNative)host; ENet.Peer peer = host_.host.Connect(hostName, port, data, channelLimit); EnetPeerNative peer_ = new EnetPeerNative(); peer_.peer = peer; return peer_; }
public override void Start() { host = platform.EnetCreateHost(); platform.EnetHostInitializeServer(host, Port, 256); }
public override bool EnetHostService(EnetHost host, int timeout, EnetEventRef enetEvent) { EnetHostNative host_ = (EnetHostNative)host; ENet.Event e; bool ret = host_.host.Service(timeout, out e); EnetEventNative ee = new EnetEventNative(); ee.e = e; enetEvent.e = ee; return ret; }
public override void EnetHostInitializeServer(EnetHost host, int port, int peerLimit) { EnetHostNative host_ = (EnetHostNative)host; host_.host.InitializeServer(port, peerLimit); }
public override void EnetHostInitialize(EnetHost host, IPEndPointCi address, int peerLimit, int channelLimit, int incomingBandwidth, int outgoingBandwidth) { if (address != null) { throw new Exception(); } EnetHostNative host_ = (EnetHostNative)host; host_.host.Initialize(null, peerLimit, channelLimit, incomingBandwidth, outgoingBandwidth); }
public abstract bool EnetHostCheckEvents(EnetHost host, EnetEventRef event_);
public override bool EnetHostCheckEvents(EnetHost host, EnetEventRef event_) { EnetHostNative host_ = (EnetHostNative)host; ENet.Event e; bool ret = host_.host.CheckEvents(out e); EnetEventNative ee = new EnetEventNative(); ee.e = e; event_.e = ee; return ret; }