|
@@ -14,11 +14,11 @@ __declspec( dllexport ) Frame &Frame::operator+=( const Frame &b ) // baut frame
|
|
dataLength += b.dataLength;
|
|
dataLength += b.dataLength;
|
|
if( dataLength )
|
|
if( dataLength )
|
|
{
|
|
{
|
|
- char *data = new char[ dataLength ];
|
|
|
|
|
|
+ char *data = new char[ (int)dataLength ];
|
|
if( data )
|
|
if( data )
|
|
- memcpy( data, this->data, dataLength - b.dataLength );
|
|
|
|
|
|
+ memcpy( data, this->data, (int)(dataLength - b.dataLength) );
|
|
if( b.data )
|
|
if( b.data )
|
|
- memcpy( data + dataLength, b.data, b.dataLength );
|
|
|
|
|
|
+ memcpy( data + dataLength, b.data, (int)b.dataLength );
|
|
delete[] this->data;
|
|
delete[] this->data;
|
|
this->data = data;
|
|
this->data = data;
|
|
}
|
|
}
|
|
@@ -137,8 +137,8 @@ __declspec( dllexport ) bool WebSocketClient::send( __int64 size, const char *da
|
|
else
|
|
else
|
|
f.opcode = 2;
|
|
f.opcode = 2;
|
|
f.dataLength = size;
|
|
f.dataLength = size;
|
|
- f.data = new char[ f.dataLength ];
|
|
|
|
- memcpy( f.data, data, f.dataLength );
|
|
|
|
|
|
+ f.data = new char[ (int)f.dataLength ];
|
|
|
|
+ memcpy( f.data, data, (int)f.dataLength );
|
|
f.key[ 0 ] = (unsigned char)(gen.rand() * 256);
|
|
f.key[ 0 ] = (unsigned char)(gen.rand() * 256);
|
|
f.key[ 1 ] = (unsigned char)(gen.rand() * 256);
|
|
f.key[ 1 ] = (unsigned char)(gen.rand() * 256);
|
|
f.key[ 2 ] = (unsigned char)(gen.rand() * 256);
|
|
f.key[ 2 ] = (unsigned char)(gen.rand() * 256);
|
|
@@ -225,7 +225,7 @@ __declspec( dllexport ) void WebSocketClient::thread()
|
|
message.dataLength = 1;
|
|
message.dataLength = 1;
|
|
message.data = 0;
|
|
message.data = 0;
|
|
if( message.dataLength )
|
|
if( message.dataLength )
|
|
- message.data = new char[ message.dataLength ];
|
|
|
|
|
|
+ message.data = new char[ (int)message.dataLength ];
|
|
for( int i = 0; i < message.dataLength; i++ )
|
|
for( int i = 0; i < message.dataLength; i++ )
|
|
{
|
|
{
|
|
ok &= klient->getNachricht( (char*)&byte, 1 );
|
|
ok &= klient->getNachricht( (char*)&byte, 1 );
|