Example #1
0
bool PRIMEServer::OnInit()
{
#ifdef _DEBUG
    Utilities::SetStdOutToNewConsole();
#endif

    PRIME::Reply a;
    
    m_frame = new MainFrame( (wxFrame *)NULL , -1, wxString::FromUTF8("FLOW Server") );
    m_frame->SetIcon(wxICON(FLOW));
    m_frame->Show( true );

    a.set_type(PRIME::Reply_ReplyType_SPEED_TEST);
    int size = a.ByteSize();
    m_frame->log(wxString::Format("Size %d", size));
	
    wxString str;
    str.Format("%d",wxThread::GetCPUCount());
    m_frame->log(str);
    //printf("\nValue %d\n", a.type());
    if(wxSocketBase::Initialize()){
        wxString t;
        t = wxString::Format("%d",a.type());
        wxString s(wxT("Socket Base Initialized\n"+t));
        m_frame->log(s);
    } else {
        //m_frame->C3OOutputText->AppendText(wxT("Socket Base NOT Initialized... Exiting!\n"));
    }
    
    return true;
}