mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-20 22:26:54 +01:00
create and use sending socket
This commit is contained in:
parent
8355b16629
commit
ea5916364b
1 changed files with 11 additions and 1 deletions
|
@ -46,6 +46,7 @@
|
||||||
#include "symblnk.h"
|
#include "symblnk.h"
|
||||||
#include "symgmdlg.h"
|
#include "symgmdlg.h"
|
||||||
#include "symutil.h"
|
#include "symutil.h"
|
||||||
|
#include "symssock.h"
|
||||||
|
|
||||||
#include "LocalizedStrIncludes.h"
|
#include "LocalizedStrIncludes.h"
|
||||||
|
|
||||||
|
@ -90,6 +91,9 @@ CXWordsAppView::~CXWordsAppView()
|
||||||
delete iDictList;
|
delete iDictList;
|
||||||
delete iRequestTimer;
|
delete iRequestTimer;
|
||||||
delete iGamesMgr;
|
delete iGamesMgr;
|
||||||
|
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||||
|
delete iSendSock;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CXWordsAppView::ConstructL(const TRect& aRect)
|
void CXWordsAppView::ConstructL(const TRect& aRect)
|
||||||
|
@ -106,6 +110,11 @@ void CXWordsAppView::ConstructL(const TRect& aRect)
|
||||||
iRequestTimer = CIdle::NewL( CActive::EPriorityIdle );
|
iRequestTimer = CIdle::NewL( CActive::EPriorityIdle );
|
||||||
iTimerRunCount = 0;
|
iTimerRunCount = 0;
|
||||||
|
|
||||||
|
#ifndef XWFEATURE_STANDALONE_ONLY
|
||||||
|
iSendSock = CSendSocket::NewL();
|
||||||
|
XP_LOGF( "iSendSock created" );
|
||||||
|
#endif
|
||||||
|
|
||||||
// Set the control's border
|
// Set the control's border
|
||||||
// SetBorder(TGulBorder::EFlatContainer);
|
// SetBorder(TGulBorder::EFlatContainer);
|
||||||
|
|
||||||
|
@ -964,7 +973,7 @@ CXWordsAppView::WritePrefs()
|
||||||
|
|
||||||
RFileWriteStream writer;
|
RFileWriteStream writer;
|
||||||
CleanupClosePushL(writer);
|
CleanupClosePushL(writer);
|
||||||
User::LeaveIfError( writer.Replace( fs, filename, EFileWrite ) );
|
User::LeaveIfError( writer.Replace( fs, nameD, EFileWrite ) );
|
||||||
|
|
||||||
writer.WriteInt8L( iCp.showBoardArrow );
|
writer.WriteInt8L( iCp.showBoardArrow );
|
||||||
writer.WriteInt8L( iCp.showRobotScores );
|
writer.WriteInt8L( iCp.showRobotScores );
|
||||||
|
@ -1187,6 +1196,7 @@ CXWordsAppView::sym_send( XP_U8* aBuf, XP_U16 aLen, CommsAddrRec* aAddr,
|
||||||
{
|
{
|
||||||
XP_S16 result = -1;
|
XP_S16 result = -1;
|
||||||
CXWordsAppView* self = (CXWordsAppView*)aClosure;
|
CXWordsAppView* self = (CXWordsAppView*)aClosure;
|
||||||
|
self->iSendSock->SendL( aBuf, aLen, aAddr );
|
||||||
|
|
||||||
XP_LOGF( "sym_send called with %d bytes, => %d", aLen, result );
|
XP_LOGF( "sym_send called with %d bytes, => %d", aLen, result );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue