| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 | 646 |
| 647 // Client initialization. | 647 // Client initialization. |
| 648 virtual bool Connect(const char* host, const char* port) = 0; | 648 virtual bool Connect(const char* host, const char* port) = 0; |
| 649 | 649 |
| 650 // Shutdown socket for both read and write. This causes blocking Send and | 650 // Shutdown socket for both read and write. This causes blocking Send and |
| 651 // Receive calls to exit. After Shutdown the Socket object cannot be used for | 651 // Receive calls to exit. After Shutdown the Socket object cannot be used for |
| 652 // any communication. | 652 // any communication. |
| 653 virtual bool Shutdown() = 0; | 653 virtual bool Shutdown() = 0; |
| 654 | 654 |
| 655 // Data Transimission | 655 // Data Transimission |
| 656 // Return 0 on failure. |
| 656 virtual int Send(const char* data, int len) const = 0; | 657 virtual int Send(const char* data, int len) const = 0; |
| 657 virtual int Receive(char* data, int len) const = 0; | 658 virtual int Receive(char* data, int len) const = 0; |
| 658 | 659 |
| 659 // Set the value of the SO_REUSEADDR socket option. | 660 // Set the value of the SO_REUSEADDR socket option. |
| 660 virtual bool SetReuseAddress(bool reuse_address) = 0; | 661 virtual bool SetReuseAddress(bool reuse_address) = 0; |
| 661 | 662 |
| 662 virtual bool IsValid() const = 0; | 663 virtual bool IsValid() const = 0; |
| 663 | 664 |
| 664 static bool SetUp(); | 665 static bool SetUp(); |
| 665 static int LastError(); | 666 static int LastError(); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 Atomic32 active_; | 757 Atomic32 active_; |
| 757 PlatformData* data_; // Platform specific data. | 758 PlatformData* data_; // Platform specific data. |
| 758 int samples_taken_; // Counts stack samples taken. | 759 int samples_taken_; // Counts stack samples taken. |
| 759 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 760 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
| 760 }; | 761 }; |
| 761 | 762 |
| 762 | 763 |
| 763 } } // namespace v8::internal | 764 } } // namespace v8::internal |
| 764 | 765 |
| 765 #endif // V8_PLATFORM_H_ | 766 #endif // V8_PLATFORM_H_ |
| OLD | NEW |