You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
848 B
C#
44 lines
848 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace ocean
|
|
{
|
|
class corework
|
|
{
|
|
private int _skts = 0;
|
|
private string _msg;
|
|
|
|
public int Init()
|
|
{
|
|
if (_skts != 0) return 0;
|
|
|
|
skts.init();
|
|
_skts = skts.server("corework");
|
|
return 0;
|
|
}
|
|
|
|
public int Deinit()
|
|
{
|
|
if (_skts == 0) return 0;
|
|
|
|
skts.close(_skts);
|
|
skts.deinit();
|
|
_skts = 0;
|
|
return 0;
|
|
}
|
|
|
|
protected void Connect()
|
|
{
|
|
if (EMSocketStatus.SOCKET_CONNECTED == (EMSocketStatus)skts.status(_skts)) return;
|
|
skts.connect(_skts);
|
|
}
|
|
|
|
protected void RecvMsg()
|
|
{
|
|
_msg = skts.recvs(_skts, 50);
|
|
}
|
|
}
|
|
}
|