タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

Programmingとsocketとlibraryに関するItisangoのブックマーク (1)

  • Socket クラス (System.Net.Sockets)

    例 次の例は、 クラスを Socket 使用して HTTP サーバーにデータを送信し、標準出力に ASCII 応答を出力する方法を示しています。 次の使用例は、ページ全体を受信するまで、呼び出し元のスレッドをブロックします。 private static void SendHttpRequest(Uri? uri = null, int port = 80) { uri ??= new Uri("http://example.com"); // Construct a minimalistic HTTP/1.1 request byte[] requestBytes = Encoding.ASCII.GetBytes(@$"GET {uri.AbsoluteUri} HTTP/1.0 Host: {uri.Host} Connection: Close "); // Create and

    Socket クラス (System.Net.Sockets)
    Itisango
    Itisango 2022/01/28
    「The Socket class provides a rich set of methods and properties for network communications. The Socket class allows you to perform both synchronous and asynchronous data transfer using any of the communication protocols listed in the ProtocolType enumeration.」
  • 1