2016-03-11 07:23:04 +00:00
|
|
|
import vibe.core.core;
|
|
|
|
import vibe.core.net;
|
|
|
|
import core.time : msecs;
|
|
|
|
|
|
|
|
class C {
|
|
|
|
TCPConnection m_conn;
|
|
|
|
|
|
|
|
this()
|
|
|
|
{
|
2016-10-24 06:22:37 +00:00
|
|
|
m_conn = connectTCP("example.com", 443);
|
2016-03-11 07:23:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
~this()
|
|
|
|
{
|
|
|
|
m_conn.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
auto c = new C;
|
|
|
|
// let druntime collect c during shutdown
|
|
|
|
}
|