MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / release_session

Method release_session

src/board_controller/emotibit/emotibit.cpp:145–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145int Emotibit::release_session ()
146{
147 if (initialized)
148 {
149 if (keep_alive)
150 {
151 stop_stream ();
152 }
153 initialized = false;
154 connection_thread.join ();
155 free_packages ();
156 send_control_msg (EMOTIBIT_DISCONNECT);
157 if (data_socket)
158 {
159 data_socket->close ();
160 delete data_socket;
161 data_socket = NULL;
162 }
163 if (control_socket)
164 {
165 control_socket->close ();
166 delete control_socket;
167 control_socket = NULL;
168 }
169 if (adv_socket)
170 {
171 adv_socket->close ();
172 delete adv_socket;
173 adv_socket = NULL;
174 }
175 control_port = -1;
176 data_port = -1;
177 }
178 return (int)BrainFlowExitCodes::STATUS_OK;
179}
180
181void Emotibit::read_thread ()
182{

Callers

nothing calls this directly

Calls 2

stop_streamFunction · 0.50
closeMethod · 0.45

Tested by

no test coverage detected