MCPcopy Create free account
hub / github.com/davisking/dlib / thread_proc

Method thread_proc

dlib/test/sockstreambuf.cpp:36–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 struct thread_proc_struct
35 {
36 static void thread_proc (
37 void* param
38 )
39 {
40
41 listener& list = *static_cast<listener*>(param);
42 connection* con;
43 list.accept(con);
44
45 ssb buf(con);
46 ostream out(&buf);
47
48
49 char ch;
50 char* bigbuf = new char[1000000];
51
52
53 for (int i = 'a'; i < 'z'; ++i)
54 {
55 ch = i;
56 out << ch << " ";
57 }
58
59 out.put('A');
60
61 for (int i = 0; i < 256; ++i)
62 {
63 ch = i;
64 out.write(&ch,1);
65 }
66
67 for (int i = -100; i < 25600; ++i)
68 {
69 out << i << " ";
70 }
71
72 out.put('A');
73
74 for (int i = -100; i < 25600; ++i)
75 {
76 out.write((char*)&i,sizeof(i));
77 }
78
79 for (int i = 0; i < 1000000; ++i)
80 {
81 bigbuf[i] = (i&0xFF);
82 }
83 out.write(bigbuf,1000000);
84
85 out.put('d');
86 out.put('a');
87 out.put('v');
88 out.put('i');
89 out.put('s');
90
91
92 string tstring = "this is a test";
93 int tint = -853;

Callers

nothing calls this directly

Calls 6

putMethod · 0.80
serializeFunction · 0.70
sleepFunction · 0.50
writeMethod · 0.45
flushMethod · 0.45
signalMethod · 0.45

Tested by

no test coverage detected