File: netTests.cpp

package info (click to toggle)
eris 1.3.14-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,016 kB
  • ctags: 1,819
  • sloc: cpp: 13,153; sh: 9,106; perl: 287; makefile: 201; ansic: 165
file content (27 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (6)
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::mem_fun(conErr, &SignalRecorderRef1<std::string>::fired));
    
    ctl.command("socket-shutdown", "_24_account_B");
    
    std::string d;
    while (!conErr.fireCount()) Eris::PollDefault::poll();
    
    
}