I'm explain my problem..
here is the sender class members
now i use the Listener to read data from the transport connection. My question is, can i use another thread , to read the data from the same trasport connection. When i tried this, it shows "a socket can not be accessed in a way forbidden by its access permissions". how to make this possible...plz suggest some solution for this..
Code:
sockWriter=new Sender(); sockWriter->client =new TcpClient(); sockWriter->client->Connect(this->hostName,this->port_number); sockWriter->clientStream=sockWriter->client->GetStream(); localSocketWriter=new Sender(this->sockWriter->clientStream); Thread *thread=new Thread(new ThreadStart(this,&platocomm::Listener)); thread->Name =S"Listener"; thread->Start();
Code:
BinaryWriter *writer; TcpClient *client; NetworkStream *clientStream; static StreamWriter *fileWriter; Sender(NetworkStream *clientStream);
Comment