Added GSocket/wxSocket alias to socket.h to prevent us from using GSocket

internal symbols
Added G721 filter for Wave
Fixed a bug in wxsocket sample


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux
1999-09-05 05:51:05 +00:00
parent 11d737b409
commit aa8fb7a016
9 changed files with 149 additions and 76 deletions

View File

@@ -60,10 +60,10 @@ enum {
#endif
void Server_OnRequest(wxSocketServer& server,
GSocketEvent evt,
wxSocketNotify evt,
char *cdata);
void Client_OnRequest(wxSocketBase& sock,
GSocketEvent evt,
wxSocketNotify evt,
char *cdata);
// ---------------------------------------------------------------------------
@@ -96,7 +96,7 @@ wxConnectionBase *wxTCPClient::MakeConnection (const wxString& host,
wxDataInputStream data_is(*stream);
wxDataOutputStream data_os(*stream);
client->SetNotify(GSOCK_INPUT_FLAG | GSOCK_LOST_FLAG);
client->SetNotify(wxSOCKET_INPUT_FLAG | wxSOCKET_LOST_FLAG);
addr.Service(server_name);
addr.Hostname(host);
@@ -162,7 +162,7 @@ bool wxTCPServer::Create(const wxString& server_name)
// Create a socket listening on specified port
server = new wxSocketServer(addr);
server->Callback((wxSocketBase::wxSockCbk)Server_OnRequest);
server->SetNotify(GSOCK_CONNECTION_FLAG);
server->SetNotify(wxSOCKET_CONNECTION_FLAG);
server->CallbackData((char *)this);
@@ -336,7 +336,7 @@ bool wxTCPConnection::Advise (const wxString& item,
return TRUE;
}
void Client_OnRequest(wxSocketBase& sock, GSocketEvent evt,
void Client_OnRequest(wxSocketBase& sock, wxSocketNotify evt,
char *cdata)
{
int msg = 0;
@@ -348,7 +348,7 @@ void Client_OnRequest(wxSocketBase& sock, GSocketEvent evt,
wxString item;
// The socket handler signals us that we lost the connection: destroy all.
if (evt == GSOCK_LOST) {
if (evt == wxSOCKET_LOST) {
sock.Close();
connection->OnDisconnect();
return;
@@ -464,20 +464,20 @@ void Client_OnRequest(wxSocketBase& sock, GSocketEvent evt,
}
void Server_OnRequest(wxSocketServer& server,
GSocketEvent evt, char *cdata)
wxSocketNotify evt, char *cdata)
{
wxTCPServer *ipcserv = (wxTCPServer *)cdata;
wxSocketStream *stream;
wxDataInputStream *codeci;
wxDataOutputStream *codeco;
if (evt != GSOCK_CONNECTION)
if (evt != wxSOCKET_CONNECTION)
return;
/* Accept the connection, getting a new socket */
wxSocketBase *sock = server.Accept();
sock->Notify(FALSE);
sock->SetNotify(GSOCK_INPUT_FLAG | GSOCK_LOST_FLAG);
sock->SetNotify(wxSOCKET_INPUT_FLAG | wxSOCKET_LOST_FLAG);
stream = new wxSocketStream(*sock);
codeci = new wxDataInputStream(*stream);