| 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 virtual ~Socket() {} | 434 virtual ~Socket() {} |
| 435 | 435 |
| 436 // Server initialization. | 436 // Server initialization. |
| 437 virtual bool Bind(const int port) = 0; | 437 virtual bool Bind(const int port) = 0; |
| 438 virtual bool Listen(int backlog) const = 0; | 438 virtual bool Listen(int backlog) const = 0; |
| 439 virtual Socket* Accept() const = 0; | 439 virtual Socket* Accept() const = 0; |
| 440 | 440 |
| 441 // Client initialization. | 441 // Client initialization. |
| 442 virtual bool Connect(const char* host, const char* port) = 0; | 442 virtual bool Connect(const char* host, const char* port) = 0; |
| 443 | 443 |
| 444 // Close. |
| 445 virtual bool Close() = 0; |
| 446 |
| 444 // Data Transimission | 447 // Data Transimission |
| 445 virtual int Send(const char* data, int len) const = 0; | 448 virtual int Send(const char* data, int len) const = 0; |
| 446 virtual int Receive(char* data, int len) const = 0; | 449 virtual int Receive(char* data, int len) const = 0; |
| 447 | 450 |
| 448 virtual bool IsValid() const = 0; | 451 virtual bool IsValid() const = 0; |
| 449 | 452 |
| 450 static bool Setup(); | 453 static bool Setup(); |
| 451 static int LastError(); | 454 static int LastError(); |
| 452 static uint16_t HToN(uint16_t value); | 455 static uint16_t HToN(uint16_t value); |
| 453 static uint16_t NToH(uint16_t value); | 456 static uint16_t NToH(uint16_t value); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 bool active_; | 507 bool active_; |
| 505 PlatformData* data_; // Platform specific data. | 508 PlatformData* data_; // Platform specific data. |
| 506 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 509 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
| 507 }; | 510 }; |
| 508 | 511 |
| 509 #endif // ENABLE_LOGGING_AND_PROFILING | 512 #endif // ENABLE_LOGGING_AND_PROFILING |
| 510 | 513 |
| 511 } } // namespace v8::internal | 514 } } // namespace v8::internal |
| 512 | 515 |
| 513 #endif // V8_PLATFORM_H_ | 516 #endif // V8_PLATFORM_H_ |
| OLD | NEW |