isocket.cs

来自「语音视频功能 里面实现了基本的QQ与语音对话」· CS 代码 · 共 28 行

CS
28
字号
using System;
using System.Net;
using System.Net.Sockets;
namespace gowk.net.Sockets
{
	/// <summary>
	/// ISocket 的摘要说明。
	/// </summary>
	public interface ISocket
	{

		int Send(byte[] buffer);
		int SendTo(byte[] buffer, EndPoint remoteEP);
		int Receive(byte[] buffer);
		int ReceiveFrom(byte[] buffer, ref EndPoint remoteEP);
		void Close();
		void Connect(string host,int port);
		void SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, int optionValue);
		void Bind(EndPoint ep);
		Proxy Proxy{get;set;}
		void LoginProxy();
		void Negotiation(string host,int port);
		void AsyncInvoke(AsyncCallback callback);
		System.IO.Stream GetStream();
		bool Connected{get;}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?