Yes.but still the same result.
On wxSocketServer program, when it read bytes less than 8000 each time,the project work well.
Search found 70 matches
- Wed Jan 12, 2011 1:20 am
- Forum: C++ Development
- Topic: When wxSocket transmiss a file which class should i use?
- Replies: 7
- Views: 2697
- Sat Jan 08, 2011 4:04 pm
- Forum: C++ Development
- Topic: When wxSocket transmiss a file which class should i use?
- Replies: 7
- Views: 2697
- Fri Jan 07, 2011 11:48 am
- Forum: C++ Development
- Topic: When wxSocket transmiss a file which class should i use?
- Replies: 7
- Views: 2697
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...
- Thu Jan 06, 2011 1:14 pm
- Forum: C++ Development
- Topic: When wxSocket transmiss a file which class should i use?
- Replies: 7
- Views: 2697
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 ?
So when transmiss a file which class should i use? wxSocketClient or wxSocketOutputStream/wxSocketInputStream ?
- Wed Jan 05, 2011 3:49 pm
- Forum: wxWidgets Development (Chinese)
- Topic: wxSocketServer接收数据的最大量是8688?
- Replies: 0
- Views: 2202
wxSocketServer接收数据的最大量是8688?
wxSocketServer和wxSocketClient通信一切正常,但是wxSocketServer接收数据的最大量是8688,当传送一个文件大于8688字节时只能读取8688字节,求解。
- Fri Dec 31, 2010 12:43 am
- Forum: C++ Development
- Topic: wxSocketServer how to get the type of received data?
- Replies: 7
- Views: 2811
- Fri Dec 31, 2010 12:41 am
- Forum: C++ Development
- Topic: wxSocketServer how to get the type of received data?
- Replies: 7
- Views: 2811
- Fri Dec 31, 2010 12:41 am
- Forum: C++ Development
- Topic: wxSocketServer how to get the type of received data?
- Replies: 7
- Views: 2811
- Fri Dec 31, 2010 12:39 am
- Forum: C++ Development
- Topic: wxSocketServer how to get the type of received data?
- Replies: 7
- Views: 2811
- Fri Dec 31, 2010 12:39 am
- Forum: C++ Development
- Topic: wxSocketServer how to get the type of received data?
- Replies: 7
- Views: 2811
- Fri Dec 31, 2010 12:38 am
- Forum: C++ Development
- Topic: wxSocketServer how to get the type of received data?
- Replies: 7
- Views: 2811
- Thu Dec 30, 2010 11:18 am
- Forum: wxWidgets Development (Chinese)
- Topic: wxSocket 如何判断接收的数据是文件还是wxChar*
- Replies: 3
- Views: 4151
- Thu Dec 30, 2010 11:17 am
- Forum: C++ Development
- Topic: wxSocketServer how to get the type of received data?
- Replies: 7
- Views: 2811
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...
- Thu Dec 30, 2010 5:14 am
- Forum: wxWidgets Development (Chinese)
- Topic: wxSocket 如何判断接收的数据是文件还是wxChar*
- Replies: 3
- Views: 4151
- Thu Dec 30, 2010 1:01 am
- Forum: C++ Development
- Topic: Sockets FAQ/Tutorial
- Replies: 31
- Views: 103989
Thanks a lot! I also have the same question.upCASE wrote:Hi!
Use wxSocketBase::GetPeer();
Code: Select all
wxIPV4address adr; server->GetPeer(adr); wxString ip = adr.Hostname();