| 96 | |
| 97 | |
| 98 | void reset_sock(Dynamic inValue) |
| 99 | { |
| 100 | if (inValue.mPtr) |
| 101 | { |
| 102 | int type = inValue->__GetType(); |
| 103 | if (type==vtClass) |
| 104 | { |
| 105 | inValue = inValue->__Field( HX_CSTRING("__s"), hx::paccNever ); |
| 106 | if (inValue.mPtr==0) |
| 107 | return; |
| 108 | type = inValue->__GetType(); |
| 109 | } |
| 110 | |
| 111 | if (type==socketType) { |
| 112 | static_cast<SocketWrapper *>(inValue.mPtr)->socket = INVALID_SOCKET; |
| 113 | return; |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | hx::Throw(HX_CSTRING("Invalid socket handle")); |
| 118 | } |
| 119 | |
| 120 | |
| 121 | /** |
no test coverage detected