This commit is contained in:
Georgy Khatuncev 2021-05-29 16:19:31 +05:00
parent d7f0d6eb18
commit c633df4ff3
3 changed files with 13 additions and 1 deletions

Binary file not shown.

@ -11,6 +11,7 @@ namespace DataClient
public class NETClient public class NETClient
{ {
private Logger log = LogManager.GetCurrentClassLogger(); private Logger log = LogManager.GetCurrentClassLogger();
private Encoding enc;
private string ip = "127.0.0.1"; private string ip = "127.0.0.1";
public string Ip public string Ip
{ {
@ -45,17 +46,28 @@ namespace DataClient
dir_browse = 23, dir_browse = 23,
user_flags = 26 user_flags = 26
} }
//Construction //Construction
public NETClient()
{
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
enc = Encoding.GetEncoding(866);
}
public NETClient(string ip, int port) public NETClient(string ip, int port)
{ {
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
enc = Encoding.GetEncoding(866);
Ip = ip; Ip = ip;
Port = port; Port = port;
} }
//Work with socket functions //Work with socket functions
public byte[] CreateCode(uint code, byte[] prefix = null, string val = null, byte[] postfix = null)
{
var res = new List<byte>();
return res.ToArray();
}
//Support functions //Support functions