File: netTests.cpp

package info (click to toggle)
eris 1.3.10-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,592 kB
  • ctags: 1,516
  • sloc: cpp: 9,850; sh: 8,288; perl: 287; ansic: 165; makefile: 162
file content (27 lines) | stat: -rw-r--r-- 768 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "stubServer.h"
#include "testUtils.h"
#include "controller.h"
#include "setupHelpers.h"
#include "signalHelpers.h"

#include <Eris/PollDefault.h>
#include <sigc++/object_slot.h>

void testServerSocketShutdown(Controller& ctl)
{
    AutoConnection con = stdConnect();
    AutoAccount player = stdLogin("account_B", "sweede", con.get());

    ctl.setEntityVisibleToAvatar("_hut_01", "acc_b_character");
    AutoAvatar av = AvatarGetter(player.get()).take("acc_b_character");
 
    SignalRecorderRef1<std::string> conErr;
    con->Failure.connect(SigC::slot(conErr, &SignalRecorderRef1<std::string>::fired));
    
    ctl.command("socket-shutdown", "_24_account_B");
    
    std::string d;
    while (!conErr.fireCount()) Eris::PollDefault::poll();
    
    
}