internal static SocketConnection ConvertStructToSocketConnection(SocketConnectionStruct structInfo) { SocketConnection connectionInfo = new SocketConnection(); connectionInfo.Fd = structInfo.SocketFd; connectionInfo.RemoteAddress = structInfo.Address; connectionInfo.Uuid = structInfo.ServiceUuid; return(connectionInfo); }
internal static SocketConnection ConvertStructToSocketConnection(SocketConnectionStruct structInfo) { SocketConnection connectionInfo = new SocketConnection(); connectionInfo.Fd = structInfo.SocketFd; connectionInfo.RemoteAddress = structInfo.Address; connectionInfo.Uuid = structInfo.ServiceUuid; connectionInfo.ServerFd = structInfo.ServerFd; BluetoothSocket clientSocket = new BluetoothSocket(); clientSocket.connectedSocket = structInfo.SocketFd; clientSocket.remoteAddress = structInfo.Address; clientSocket.serviceUuid = structInfo.ServiceUuid; connectionInfo.ClientSocket = (IBluetoothServerSocket)clientSocket; return(connectionInfo); }