You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
615 B

using System.Net;
using System.Net.Sockets;
using System.Text;
namespace Client;
internal class Client
{
static void Main(string[] args)
{
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
socket.Connect(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 20000));
byte[] buffer = new byte[1024];
//socket.Receive(buffer, SocketFlags.Peek);
socket.Send(Encoding.UTF8.GetBytes("normal"), SocketFlags.None);
socket.Send(Encoding.UTF8.GetBytes("OOB"), SocketFlags.OutOfBand); // tcp 헤더에 urgent mode 활성화 (긴급 메시지)
Console.ReadLine();
}
}