MCPcopy Create free account
hub / github.com/SFML/SFML / onStop

Method onStop

examples/voip/Client.cpp:86–99  ·  view source on GitHub ↗

/////////////////////////////////////////////////////// \see SoundRecorder::onStop ///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

84 ///
85 ////////////////////////////////////////////////////////////
86 void onStop() override
87 {
88 // Send an "end-of-stream" packet
89 sf::Packet packet;
90 packet << clientEndOfStream;
91
92 if (m_socket.send(packet) != sf::Socket::Status::Done)
93 {
94 std::cerr << "Failed to send end-of-stream packet" << std::endl;
95 }
96
97 // Close the socket
98 m_socket.disconnect();
99 }
100
101 ////////////////////////////////////////////////////////////
102 // Member data

Callers

nothing calls this directly

Calls 2

sendMethod · 0.45
disconnectMethod · 0.45

Tested by

no test coverage detected