+++ /dev/null
-/** @file\r
- Implement the write API.\r
-\r
- Copyright (c) 2011, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <SocketInternals.h>\r
-\r
-\r
-/**\r
- Write support routine for sockets\r
-\r
- @param [in] pDescriptor Descriptor address for the file\r
- @param [in] pOffset File offset\r
- @param [in] LengthInBytes Number of bytes to write\r
- @param [in] pBuffer Address of the data\r
-\r
- @return The number of bytes written or -1 if an error occurs.\r
- In the case of an error, ::errno contains more details.\r
-\r
-**/\r
-ssize_t\r
-EFIAPI\r
-BslSocketWrite (\r
- struct __filedes *pDescriptor,\r
- off_t * pOffset,\r
- size_t LengthInBytes,\r
- const void * pBuffer\r
- )\r
-{\r
- ssize_t BytesWritten;\r
-\r
- //\r
- // Send the data using the socket\r
- //\r
- BytesWritten = send ( pDescriptor->MyFD,\r
- pBuffer,\r
- LengthInBytes,\r
- 0 );\r
-\r
- //\r
- // Return the number of bytes written\r
- //\r
- return BytesWritten;\r
-}\r