一个聊天Demo让你知道蓝牙之间的通讯

提示:本文主要是讲解蓝牙中心管理者和外设管理者之间的通讯过程,没有实际的意义,因为传输受字节限制,效率低。

老样子,先附上效果图和Demo


外设模式

中心模式

Demo
https://github.com/chenfanfang/CollectionsOfExample


运行程序

1、首先得准备两部苹果手机,必须支持BLE, >=iPhone 4s即可。
2、将程序运行到两部手机上
3、进入 “聊天(CoreBluetooth实战1)”
4、一部手机进入中心模式、另一部手机进入外设模式 (记得两部手机都要开启蓝牙哦)

写在前面的废话

由于懒,时隔大半年没写技术文章了,今天心血来潮来发表一篇文章。由于以前没有做过蓝牙的项目,好奇心也蛮强的,想知道蓝牙之间的通讯是怎样的,早就在去年6月份的时候开始看蓝牙的资料,但是基本都是断断续续,没有一股气完成对蓝牙的研究(当初还买了蓝牙开发板,并且傻瓜式地将程序烧录进去,就是效果还没完全写出来,等有时间会写一篇真正蓝牙实战的文章,你也别问我为嘛不用LightBlue,因为那时我没有第二部手机并且觉得实物实战比较好)。本文demo核心内容在去年9月份左右的时候完成的(参照了几个demo,由于时隔太久,无法将所参照的demo所在连接找出来),但是对界面美化要求程度比较高,一直没有发布出来,昨天套了个即时通讯界面的框架JSQMessagesViewController中demo的界面,感觉界面效果还行,称热打铁,写一篇相关文章。我已经将蓝牙通讯的相关代码和界面相关代码分离开来,不会影响大家对蓝牙代码的阅读。由于demo中注释比较详细,本文就不做过多的阐述,直接附上代码。

相关蓝牙资料

若对蓝牙不是太了解的朋友,在此推荐几篇蓝牙相关博客
iOS蓝牙开发(一)蓝牙相关基础知识
iOS蓝牙开发(二)ios连接外设的代码实现
iOS蓝牙开发(三)app作为外设被连接的实现

中心管理者

中心管理者相关流程:(以下流程摘抄自一个demo)

1,主流成:程序之行,就进入回调函数centralManagerDidUpdateState,这个相当于起步函数
2,半主流程:上一步中,centralManager调用scan函数,向周边搜寻服务
3,当扫描到时,会触发centralManager的代理的centralManager:didDiscoverPeripheral函数,赋值周边成员,并试图与其建立连接
4,如果建立建立连接失败,会调用代理的centralManager:didFailToConnectPeripheral:函数
4,如果成功,会触发centralManager:didConnectPeripheral:,这时候讲viewc设置为周边成员的代理
5,在上部的回调函数中,调用周边的discoverServices方法,去发现服务
6,当周边发现服务时,会触发周边的代理的peripheral:didDiscoverServices:
7,在上述回调函数中,周边针对每一个发现的服务去搜寻对应特征
8,发现对应特征后是,会触发周边的代理的peripheral:didDiscoverCharacteristicsForService:函数
9,在上部的回调函数中,判断发现的特征是否是感兴趣的特征,如果是,则通过设定特征通知状态为真,来预订该特征。此时会触发服务端didSubscribeToCharacteristic函数。
10,当周边的特征通知状态发生变化时,会触发周边代理的peripheral:didUpdateNotificationStateForCharacteristic:,并没什么卵用,这个回调函数。
10,服务端的调用updatevalue函数,会触发客户端的didUpdateValueForCharacteristic:函数,从而获得服务端传递的字符串
另外,中央管理器调用取消周边连接函数,会触发,中央管理器代理的centralManager:didDisconnectPeripheral方法,用于对断开连接后进行后续处理

中心管理者(CBCentralManager)相关代码如下

//
//  CBCentralManagerController.m
//  CoreBluetooth_Demo
//
//  Created by mac on 16/9/9.
//  Copyright © 2016年 chenfanfang. All rights reserved.
//

#import "CBCentralManagerController.h"

#import <CoreBluetooth/CoreBluetooth.h>

//可通过终端命令 uuidgen来生成
#define TRANSFER_SERVICE_UUID           @"D63D44E5-E798-4EA5-A1C0-3F9EEEC2CDEB"
#define TRANSFER_CHARACTERISTIC_UUID    @"1652CAD2-6B0D-4D34-96A0-75058E606A98"

@interface CBCentralManagerController ()<CBCentralManagerDelegate, CBPeripheralDelegate>

/** 中心管理者 */
@property (strong, nonatomic) CBCentralManager *centralManager;

/** 发现的外设 */
@property (strong, nonatomic) CBPeripheral *discoveredPeripheral;

/** 当前的特征 */
@property (nonatomic, strong) CBCharacteristic *characteristic;

/** 数据 */
@property (strong, nonatomic) NSMutableData *data;

@end

@implementation CBCentralManagerController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    
    self.navigationItem.title = @"中心模式";
    
    // 设置CBCentralManager
    _centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];
    
    // 保存接收数据
    _data = [[NSMutableData alloc] init];
    
    //菊花转动
    [self.activityIndicatorView startAnimating];
}



- (void)viewWillDisappear:(BOOL)animated {
    
    [super viewWillDisappear:animated];
    
    [self.centralManager stopScan];
    
    [self cleanup];
    
    [self.activityIndicatorView stopAnimating];
    
    self.centralManager = nil;
    
    NSLog(@"扫描停止");
    
    
}

- (void)dealloc {
    
    NSLog(@"%@控制器销毁成功,无内存泄漏",NSStringFromClass([self class]));
}

//=================================================================
//                    CBCentralManagerDelegate
//=================================================================
#pragma mark - CBCentralManagerDelegate


//设置成功回调方法
- (void)centralManagerDidUpdateState:(CBCentralManager *)central {
    
    if (central.state != CBCentralManagerStatePoweredOn) {
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"温馨提示" message:@"请打开您的蓝牙" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
        [alertView show];
        return;
    }

    //开始扫描
    [self scan];
    
}


/** 通过制定的128位的UUID,扫描外设
 */
- (void)scan {
    
    [self.activityIndicatorView startAnimating];
    //扫描
    [self.centralManager scanForPeripheralsWithServices:@[[CBUUID UUIDWithString:TRANSFER_SERVICE_UUID]] options:@{ CBCentralManagerScanOptionAllowDuplicatesKey : @YES }];
    NSLog(@"正在扫描外设");

}

/** 停止扫描
 */
- (void)stop {
    [self.activityIndicatorView stopAnimating];
    [self.centralManager stopScan];
    
    NSLog(@"停止扫描外设");
    
}

//扫描成功调用此方法
- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI {
    
    NSLog(@"发现外设 %@ at %@", peripheral.name, RSSI);
    
    if (self.discoveredPeripheral != peripheral) {
        self.discoveredPeripheral = peripheral;
        
        NSLog(@"连接外设 %@", peripheral);
        [self.centralManager connectPeripheral:peripheral options:nil];
    }
}


- (void)centralManager:(CBCentralManager *)central didFailToConnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error {
    
    NSLog(@"连接失败 %@. (%@)", peripheral, [error localizedDescription]);
    [self cleanup];
}

//连接外设成功
- (void)centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPeripheral *)peripheral {
    
    [self stop];
    NSLog(@"停止扫描外设");
    
    [self.data setLength:0];//重置data属性
    
    peripheral.delegate = self;//设置外设对象的委托为self
    
    NSLog(@"外设已连接,正在搜寻服务...");
    [peripheral discoverServices:@[[CBUUID UUIDWithString:TRANSFER_SERVICE_UUID]]];
}



//=================================================================
//                       CBPeripheralDelegate
//=================================================================
#pragma mark - CBPeripheralDelegate

//发现服务成功
- (void)peripheral:(CBPeripheral *)peripheral didDiscoverServices:(NSError *)error {
    
    if (error) {
        NSLog(@"Error discovering services: %@", [error localizedDescription]);
        [self cleanup];
        return;
    }
    NSLog(@"成功发现服务,正在搜寻特征...");
    
    // 发现特征
    for (CBService *service in peripheral.services) {
        [peripheral discoverCharacteristics:@[[CBUUID UUIDWithString:TRANSFER_CHARACTERISTIC_UUID]] forService:service];
    }
}

//发现特征成功
- (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error {
    
    if (error) {
        NSLog(@"发现特征错误: %@", [error localizedDescription]);
        [self cleanup];
        return;
    }
    NSLog(@"成功发现特征,正在预定特征...");
    
    for (CBCharacteristic *characteristic in service.characteristics) {
        
        if ([characteristic.UUID isEqual:[CBUUID UUIDWithString:TRANSFER_CHARACTERISTIC_UUID]]) {
            // 预定特征
            [peripheral setNotifyValue:YES forCharacteristic:characteristic];//触发服务端(外设)didSubscribeToCharacteristic函数
            
            self.characteristic = characteristic;
            
            [self.activityIndicatorView stopAnimating];
            NSLog(@"找到需要的特征,预定成功");
        }
    }
}

//特征值发生变化
- (void)peripheral:(CBPeripheral *)peripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error {
    
    if (error) {
        NSLog(@"发现特征错误:: %@", [error localizedDescription]);
        return;
    }
    NSLog(@"特征值发生变化");
    
    NSString *stringFromData = [[NSString alloc] initWithData:characteristic.value encoding:NSUTF8StringEncoding];
    
    // 判断是否为数据结束
    if ([stringFromData isEqualToString:@"END"]) {
        
        // 显示数据
        NSString* recString = [[NSString alloc] initWithData:self.data encoding:NSUTF8StringEncoding];
        [self addReceiveMessage:recString];
        self.data.length = 0;
        return;
    }
    
    // 接收数据追加到data属性中
    [self.data appendData:characteristic.value];
}

//特征通知状态发生变化
- (void)peripheral:(CBPeripheral *)peripheral didUpdateNotificationStateForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error {
    
    if (error) {
        NSLog(@"特征通知状态变化错误: %@", error.localizedDescription);
    }
    
    // 如果没有特征传输过来则退出(如果不是我们感兴趣的特质)
    if (![characteristic.UUID isEqual:[CBUUID UUIDWithString:TRANSFER_CHARACTERISTIC_UUID]]) {
        return;
    }
    
    NSLog(@"特征通知状态发生变化");

    // 特征通知已经开始
    if (characteristic.isNotifying) {
        NSLog(@"特征通知已经开始 %@", characteristic);
    }
    // 特征通知已经停止
    else {
        NSLog(@"特征通知已经停止 %@", characteristic);
        [self.centralManager cancelPeripheralConnection:peripheral];
    }
}

//与外设连接断开时回调
- (void)centralManager:(CBCentralManager *)central didDisconnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error {
    
    NSLog(@"外设已经断开");
    self.discoveredPeripheral = nil;
    //外设已经断开情况下,重新扫描
    [self scan];
}


/** 清除方法
 */
- (void)cleanup {
    
    NSLog(@"清除订阅特征");
    // 如果没有连接则退出
    if (self.discoveredPeripheral.state != CBPeripheralStateConnected) {
        return;
    }
    
    // 判断是否已经预定了特征
    
    for (CBService *service in self.discoveredPeripheral.services) {
        
        for (CBCharacteristic *characteristic in service.characteristics) {
            if ([characteristic.UUID isEqual:[CBUUID UUIDWithString:TRANSFER_CHARACTERISTIC_UUID]]) {
                if (characteristic.isNotifying) {
                    //停止接收特征通知
                    [self.discoveredPeripheral setNotifyValue:NO forCharacteristic:characteristic];
                    //断开与外设连接
                    [self.centralManager cancelPeripheralConnection:self.discoveredPeripheral];
                    return;
                }
            }
        }
    }
}



//添加从外设发来的消息
-(void)addReceiveMessage:(NSString*)message{
    
    NSLog(@"收到从外设发来的消息:\n%@",message);
    
    //下面代码无需研究,只是为了显示在屏幕上
    [self receiveMessage:message senderId:kJSQDemoAvatarIdCook senderName:kJSQDemoAvatarDisplayNameCook];
    
}



//=================================================================
//                           发送文本数据
//=================================================================
#pragma mark - 发送文本数据

- (void)didPressSendButton:(UIButton *)button
           withMessageText:(NSString *)text
                  senderId:(NSString *)senderId
         senderDisplayName:(NSString *)senderDisplayName
                      date:(NSDate *)date {
    
    if (self.activityIndicatorView.isAnimating) {
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"温馨提示" message:@"没有与外设建立链接,无法发送数据" delegate:nil cancelButtonTitle:@"" otherButtonTitles:nil, nil];
        [alertView show];
        return;
    }
    
    NSLog(@"要发送的消息为:\n%@",text);
    NSData *writeData = [text dataUsingEncoding:NSUTF8StringEncoding];
    
    if (self.characteristic.properties & CBCharacteristicPropertyWrite) {
        [self.discoveredPeripheral writeValue:writeData forCharacteristic:self.characteristic type:CBCharacteristicWriteWithResponse];
    }

    //下面代码无需研究,只是为了显示在屏幕上
    [super didPressSendButton:button withMessageText:text senderId:senderId senderDisplayName:senderDisplayName date:date];
}



- (void)peripheral:(CBPeripheral *)peripheral didWriteValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error {
    NSLog(@"给外设写入数据成功");
}



//=================================================================
//                        和界面相关,请忽略
//=================================================================
#pragma mark - 和界面相关,请忽略

- (NSString *)senderId {
    return kJSQDemoAvatarIdWoz;
    
}

@end




外设管理者

中心管理者相关流程:(以下流程摘抄自一个demo)

1,入口函数,peripheralManagerDidUpdateState,处理:特征准备,服务准备的工作;设置服务的特征;将服务添加到周边管理器上
2,服务添加成功,会触发周边管理器代理的peripheralManager:didAddService:
3,在上部的回调函数中,广播广播服务,等待中心即客户端预订改服务。。。
4,一旦客户端预订成功,则调用周边管理器代理的peripheralManager:central:didSubscribeToCharacteristic:,表明管道已经打通了,接下来将发送按钮变为有效状态,由服务器决定是否发送
5,在上面的回调函数中,处理发送数据:通过调用周边管理器的updateValue方法,来实现发送。这个应该会触发中央的peripheral:didUpdateValueForCharacteristic函数

外设管理者(CBPeripheralManager)相关代码如下

//
//  CBPeripheralManagerController.m
//  CoreBluetooth_Demo
//
//  Created by mac on 16/9/9.
//  Copyright © 2016年 chenfanfang. All rights reserved.
//

#import "CBPeripheralManagerController.h"

#import <CoreBluetooth/CoreBluetooth.h>

//可通过终端命令 uuidgen来生成
#define TRANSFER_SERVICE_UUID @"D63D44E5-E798-4EA5-A1C0-3F9EEEC2CDEB"
#define TRANSFER_CHARACTERISTIC_UUID @"1652CAD2-6B0D-4D34-96A0-75058E606A98"

//每次向中心设备发送数据的最大的数据量
#define SEND_DATA_MAX_AMOUNT 20


@interface CBPeripheralManagerController ()<CBPeripheralManagerDelegate>

/** 外设管理者 */
@property (strong, nonatomic) CBPeripheralManager *peripheralManager;

/** 特征 */
@property (strong, nonatomic) CBMutableCharacteristic *transferCharacteristic;

/** 需要发送的数据 */
@property (strong, nonatomic) NSData *dataToSend;

/** 需要发送的数据的字节的下标标记 */
@property (nonatomic, readwrite) NSInteger sendDataIndex;


@end

@implementation CBPeripheralManagerController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    
    self.navigationController.navigationBar.translucent = NO;
    
    self.navigationItem.title = @"外设模式";
    
    //设置CBPeripheralManager
    _peripheralManager = [[CBPeripheralManager alloc] initWithDelegate:self queue:nil];
    
    [self.activityIndicatorView startAnimating];
}


- (void)viewWillDisappear:(BOOL)animated {
    
    [super viewWillDisappear:animated];
    
    [self.peripheralManager stopAdvertising];
    
    self.peripheralManager = nil;

    
}


- (void)dealloc {
    
    NSLog(@"%@控制器销毁成功,无内存泄漏",NSStringFromClass([self class]));
}

//=================================================================
//                    CBPeripheralManagerDelegate
//=================================================================
#pragma mark - CBPeripheralManagerDelegate

//外设设置成功回调此方法
- (void)peripheralManagerDidUpdateState:(CBPeripheralManager *)peripheral {
    
    if (peripheral.state != CBPeripheralManagerStatePoweredOn) {
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"温馨提示" message:@"请您打开蓝牙" delegate:nil cancelButtonTitle:@"" otherButtonTitles:nil, nil];
        [alertView show];
        return;
    }
    
    NSLog(@"蓝牙处于打开状态");
    
    // 初始化特征
    self.transferCharacteristic = [[CBMutableCharacteristic alloc]
                                   initWithType:[CBUUID UUIDWithString:TRANSFER_CHARACTERISTIC_UUID]
                                   properties:CBCharacteristicPropertyNotify | CBCharacteristicPropertyWrite
                                   value:nil
                                   permissions:CBAttributePermissionsWriteable]; //CBAttributePermissionsReadable
    
    // 初始化服务
    CBMutableService *transferService = [[CBMutableService alloc]
                                         initWithType:[CBUUID UUIDWithString:TRANSFER_SERVICE_UUID]
                                         primary:YES];
    
    // 添加特征到服务
    transferService.characteristics = @[self.transferCharacteristic];
    
    // 发布服务与特征(将服务添加到外设中)
    [self.peripheralManager addService:transferService];
}


- (void)peripheralManager:(CBPeripheralManager *)peripheral
            didAddService:(CBService *)service
                    error:(NSError *)error {
    
    if (error) {
        NSLog(@"添加服务失败: %@", [error localizedDescription]);
        
    }else{
        NSLog( @"添加服务成功,准备广播..." );
        [self.peripheralManager startAdvertising:@{ CBAdvertisementDataServiceUUIDsKey : @[[CBUUID UUIDWithString:TRANSFER_SERVICE_UUID]] }];
    }
}


//中心管理者订阅了特征,会回调该方法
- (void)peripheralManager:(CBPeripheralManager *)peripheral central:(CBCentral *)central didSubscribeToCharacteristic:(CBCharacteristic *)characteristic {
    
    [self.activityIndicatorView stopAnimating];
    NSLog(@"中心已经订阅了特征");
    
}

//中心管理者取消订阅了特征,会回调该方法
- (void)peripheralManager:(CBPeripheralManager *)peripheral central:(CBCentral *)central didUnsubscribeFromCharacteristic:(CBCharacteristic *)characteristic {
    
    [self.activityIndicatorView startAnimating];
    NSLog(@"中心取消订阅特征");
    
}



//向中心管理者发送数据
//注意,发送大量的数据时,需要将数据分成多个小数据发送,要不然会发送失败
- (void)sendData {

    /** 是否开始发送 END  */
    static BOOL sendingEND = NO;
    
    
    //开始发送最后的 结束标识符  END
    if (sendingEND == YES) {
        BOOL didSend = [self.peripheralManager updateValue:[@"END" dataUsingEncoding:NSUTF8StringEncoding] forCharacteristic:self.transferCharacteristic onSubscribedCentrals:nil];
        if (didSend == YES) {
            sendingEND = NO;
            NSLog(@"发送数据完毕");
        }
        return;
    }
    
    
    //已经发送完毕
    if (self.sendDataIndex >= self.dataToSend.length) {
        return;
    }
    
    BOOL didSend = YES;
    
    //正在发送数据
    while (didSend) {
        
        //本次需要发送的数据量
        NSInteger amountToSend = self.dataToSend.length - self.sendDataIndex;
        
        //若发送的数量大于规定的最大发送的数据量
        if (amountToSend > SEND_DATA_MAX_AMOUNT) amountToSend = SEND_DATA_MAX_AMOUNT;
        
        //本次需要发送的数据
        NSData *smallData = [NSData dataWithBytes:self.dataToSend.bytes + self.sendDataIndex length:amountToSend];
        
        //发送数据
        didSend = [self.peripheralManager updateValue:smallData forCharacteristic:self.transferCharacteristic onSubscribedCentrals:nil];
        
        //发送数据失败 直接return
        if (didSend == NO) {
            return;
        }
        
        //更新需要发送的数据的字节下标
        self.sendDataIndex += amountToSend;
        
        //数据完全发送完成,记得需要发送一个结束的标识
        if (self.sendDataIndex >= self.dataToSend.length) {
            
            sendingEND = YES;
            
            BOOL endSent = [self.peripheralManager updateValue:[@"END" dataUsingEncoding:NSUTF8StringEncoding] forCharacteristic:self.transferCharacteristic onSubscribedCentrals:nil];
            
            if (endSent) {
                sendingEND = NO;
                NSLog(@"发送数据完毕");
                
            }
            return;
        }
    }
}

//发送数据失败后(发送数据的队列已经满了)重新发送
- (void)peripheralManagerIsReadyToUpdateSubscribers:(CBPeripheralManager *)peripheral {
    [self sendData];
}


- (void)peripheralManager:(CBPeripheralManager *)peripheral didReceiveWriteRequests:(NSArray<CBATTRequest *> *)requests {
    
    CBATTRequest *request = requests.firstObject;
    NSString *receiveMsg = [[NSString alloc] initWithData:request.value encoding:NSUTF8StringEncoding];
    [peripheral respondToRequest:request withResult:CBATTErrorSuccess];
    
    NSLog(@"收到从中心管理者发来的消息:\n%@",receiveMsg);
    
    //下面代码无需研究,只是为了显示在屏幕上
    [self receiveMessage:receiveMsg senderId:kJSQDemoAvatarIdWoz senderName:kJSQDemoAvatarDisplayNameWoz];
    
}



//=================================================================
//                           发送文本数据
//=================================================================
#pragma mark - 发送文本数据

- (void)didPressSendButton:(UIButton *)button
           withMessageText:(NSString *)text
                  senderId:(NSString *)senderId
         senderDisplayName:(NSString *)senderDisplayName
                      date:(NSDate *)date {
    
    NSLog(@"要发送的消息为:\n%@",text);
    
    //判断是否与中心管理者保持着链接
    if (self.activityIndicatorView.isAnimating) {
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"温馨提示" message:@"没有与中心管理者建立链接,无法发送数据" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
        [alertView show];
        return;
    }
    
    self.sendDataIndex = 0;
    self.dataToSend = [text dataUsingEncoding:NSUTF8StringEncoding];
    [self sendData];
    
    //下面代码无需研究,只是为了显示在屏幕上
    [super didPressSendButton:button withMessageText:text senderId:senderId senderDisplayName:senderDisplayName date:date];
}


//=================================================================
//                        和界面相关,请忽略
//=================================================================
#pragma mark - 和界面相关,请忽略

- (NSString *)senderId {
    return kJSQDemoAvatarIdCook;
}


@end


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 158,847评论 4 362
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,208评论 1 292
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,587评论 0 243
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,942评论 0 205
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,332评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,587评论 1 218
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,853评论 2 312
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,568评论 0 198
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,273评论 1 242
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,542评论 2 246
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,033评论 1 260
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,373评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,031评论 3 236
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,073评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,830评论 0 195
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,628评论 2 274
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,537评论 2 269

推荐阅读更多精彩内容