OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 | 441 |
442 // Shutdown socket for both read and write. This causes blocking Send and | 442 // Shutdown socket for both read and write. This causes blocking Send and |
443 // Receive calls to exit. After Shutdown the Socket object cannot be used for | 443 // Receive calls to exit. After Shutdown the Socket object cannot be used for |
444 // any communication. | 444 // any communication. |
445 virtual bool Shutdown() = 0; | 445 virtual bool Shutdown() = 0; |
446 | 446 |
447 // Data Transimission | 447 // Data Transimission |
448 virtual int Send(const char* data, int len) const = 0; | 448 virtual int Send(const char* data, int len) const = 0; |
449 virtual int Receive(char* data, int len) const = 0; | 449 virtual int Receive(char* data, int len) const = 0; |
450 | 450 |
| 451 // Set the value of the SO_REUSEADDR socket option. |
| 452 virtual bool SetReuseAddress(bool reuse_address) = 0; |
| 453 |
451 virtual bool IsValid() const = 0; | 454 virtual bool IsValid() const = 0; |
452 | 455 |
453 static bool Setup(); | 456 static bool Setup(); |
454 static int LastError(); | 457 static int LastError(); |
455 static uint16_t HToN(uint16_t value); | 458 static uint16_t HToN(uint16_t value); |
456 static uint16_t NToH(uint16_t value); | 459 static uint16_t NToH(uint16_t value); |
457 static uint32_t HToN(uint32_t value); | 460 static uint32_t HToN(uint32_t value); |
458 static uint32_t NToH(uint32_t value); | 461 static uint32_t NToH(uint32_t value); |
459 }; | 462 }; |
460 | 463 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 bool active_; | 510 bool active_; |
508 PlatformData* data_; // Platform specific data. | 511 PlatformData* data_; // Platform specific data. |
509 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 512 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
510 }; | 513 }; |
511 | 514 |
512 #endif // ENABLE_LOGGING_AND_PROFILING | 515 #endif // ENABLE_LOGGING_AND_PROFILING |
513 | 516 |
514 } } // namespace v8::internal | 517 } } // namespace v8::internal |
515 | 518 |
516 #endif // V8_PLATFORM_H_ | 519 #endif // V8_PLATFORM_H_ |
OLD | NEW |