1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Winsock initialization must happen before any Winsock calls are made. The 6 // EnsureWinsockInit method will make sure that WSAStartup has been called. If 7 // the call to WSAStartup caused Winsock to initialize, WSACleanup will be 8 // called automatically on program shutdown. 9 10 #ifndef NET_BASE_WINSOCK_INIT_H_ 11 #define NET_BASE_WINSOCK_INIT_H_ 12 13 namespace net { 14 15 // Make sure that Winsock is initialized, calling WSAStartup if needed. 16 void EnsureWinsockInit(); 17 18 } // namespace net 19 20 #endif // NET_BASE_WINSOCK_INIT_H_ 21