Search found 70 matches

by hats
Wed Jan 12, 2011 1:20 am
Forum: C++ Development
Topic: When wxSocket transmiss a file which class should i use?
Replies: 7
Views: 2638

Yes.but still the same result.
On wxSocketServer program, when it read bytes less than 8000 each time,the project work well.
by hats
Sat Jan 08, 2011 4:04 pm
Forum: C++ Development
Topic: When wxSocket transmiss a file which class should i use?
Replies: 7
Views: 2638

I use wxSoketClient::SetFlags(wxSOCKET_BLOCK) and wxSocketServer::SetFlags(wxSOCKET_BLOCK) before read.
but result is the same.
by hats
Fri Jan 07, 2011 11:48 am
Forum: C++ Development
Topic: When wxSocket transmiss a file which class should i use?
Replies: 7
Views: 2638

ok! I use wxThread in wxSocketClient,when drop files on wxTextCtrl,the thread will be run. First i write 1 byte to tell wxSocketServer that 1 is a file,and then 4 bytes to tell wxSocketServer file'size,and then 50 bytes is the file's name,and last is file data that need to be saved. here is the code...
by hats
Thu Jan 06, 2011 1:14 pm
Forum: C++ Development
Topic: When wxSocket transmiss a file which class should i use?
Replies: 7
Views: 2638

When wxSocket transmiss a file which class should i use?

I use wxSocketClient transmiss a file to wxSocketServer,when the file's length less than 8688 bytes,they work well,otherwise,wxSocketServer will read 8688 bytes at most.
So when transmiss a file which class should i use? wxSocketClient or wxSocketOutputStream/wxSocketInputStream ?
by hats
Wed Jan 05, 2011 3:49 pm
Forum: wxWidgets Development (Chinese)
Topic: wxSocketServer接收数据的最大量是8688?
Replies: 0
Views: 2189

wxSocketServer接收数据的最大量是8688?

wxSocketServer和wxSocketClient通信一切正常,但是wxSocketServer接收数据的最大量是8688,当传送一个文件大于8688字节时只能读取8688字节,求解。
by hats
Fri Dec 31, 2010 12:43 am
Forum: C++ Development
Topic: wxSocketServer how to get the type of received data?
Replies: 7
Views: 2729

Thank you!I know how to do now.
by hats
Fri Dec 31, 2010 12:41 am
Forum: C++ Development
Topic: wxSocketServer how to get the type of received data?
Replies: 7
Views: 2729

Thank you!I know how to do now.
by hats
Fri Dec 31, 2010 12:41 am
Forum: C++ Development
Topic: wxSocketServer how to get the type of received data?
Replies: 7
Views: 2729

Thank you!I know how to do now.
by hats
Fri Dec 31, 2010 12:39 am
Forum: C++ Development
Topic: wxSocketServer how to get the type of received data?
Replies: 7
Views: 2729

Thank you!I know how to do now.
by hats
Fri Dec 31, 2010 12:39 am
Forum: C++ Development
Topic: wxSocketServer how to get the type of received data?
Replies: 7
Views: 2729

Thank you!I know how to do now.
by hats
Fri Dec 31, 2010 12:38 am
Forum: C++ Development
Topic: wxSocketServer how to get the type of received data?
Replies: 7
Views: 2729

Thank you!I know how to do now.
by hats
Thu Dec 30, 2010 11:18 am
Forum: wxWidgets Development (Chinese)
Topic: wxSocket 如何判断接收的数据是文件还是wxChar*
Replies: 3
Views: 4099

无人..发到英文板块去,看看情况怎么样。
by hats
Thu Dec 30, 2010 11:17 am
Forum: C++ Development
Topic: wxSocketServer how to get the type of received data?
Replies: 7
Views: 2729

wxSocketServer how to get the type of received data?

a simple wxSocketClient and wxSocketServer program. now they can send message and file to each other as well. it is the code that send text message: const wxChar* buf; wxString text = TextCtrl1->GetValue();//text that to send buf = text.c_str(); wxUint32 len = (wxStrlen(buf)+1)*sizeof(wxChar);//size...
by hats
Thu Dec 30, 2010 5:14 am
Forum: wxWidgets Development (Chinese)
Topic: wxSocket 如何判断接收的数据是文件还是wxChar*
Replies: 3
Views: 4099

怎么发送标志呢?发送文件前先发一个数据,说明它是个文件?
by hats
Thu Dec 30, 2010 1:01 am
Forum: C++ Development
Topic: Sockets FAQ/Tutorial
Replies: 31
Views: 95612

upCASE wrote:Hi!
Use wxSocketBase::GetPeer();

Code: Select all

wxIPV4address adr;
server->GetPeer(adr);
wxString ip = adr.Hostname();
Thanks a lot! I also have the same question.